Basic Programs Of Java

15. Program

//Find the O/P ?

class O { public static void main(String args[]) { int i; System.out.println("done"); } }

16. Program

//Find the O/P ?

class P { public static void main(String args[]) { int i; System.out.println(i=10); } }

17. Program

//Find the O/P ?

class Q { public static void main(String args[]) { int i; int j = i; System.out.println(i); System.out.println(j); } // Compiletion Error }

18. Program

//Find the O/P ?

class R { public static void main(String args[]) { int i; int j = 10; int k = i + j; System.out.println(i); System.out.println(j); System.out.println(k); } }

19. Program

//Find the O/P ?

class S { public static void main(String args[]) { int i; i++; System.out.println("done"); } }

20. Program

//Find the O/P ?

class T { public static void main(String args[]) { int i = 10; double i = 20.9; System.out.println("done"); } }

21. Program

//Find the O/P ?

class U { public static void main(String args[]) { int i = 10; System.out.println("i value :" + i); } }

Page....