Basic Programs Of Java

22. Program

//Find what it gives Error / Output ?

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

23. Program

//Find the O/P ?

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

24. Program

//Find the O/P ?

class X { public static void main(String args[]) { int i = 10, j = 20; System.out.println(" i = " + i ); System.out.println(" j = " + j ); System.out.println("sum :" +( i + j) ); } }

25. Program

//Find the O/P ?

class Y { public static void main(String args[]) { System.out.print("Hello "); System.out.print("Lara "); System.out.print("Rst"); //all Will Print In Same LIne } }

26. Program

//Find the O/P ?

class Z { public static void main(String args[]) { System.out.print(); //This Line Gives Error System.out.println(); } }

27. Program

//Find the O/P ?

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

28. Program

//Find the O/P ?

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

Page....