Wrapper Classes

22. Program

//Find what it gives Compiletion Error / Compiletion Successfully / Output ?

class M22 { public static void main(String[] args) { Integer obj1 = new Integer(10); Integer obj2 = 10; //new Integer(10); System.out.println("done"); } }

23. Program

//Find what it gives Compiletion Error / Compiletion Successfully / Output ?

class M23 { public static void main(String[] args) { int i = 10; int j = new Integer(10); //new Integer(10).intValue(); System.out.println("done"); } }

24. Program

//Find what it gives Compiletion Error / Compiletion Successfully / Output ?

class M24 { public static void main(String[] args) { char c1 = new Character('s'); char c2 = 's'; System.out.println("done"); } }

25. Program

//Find what it gives Compiletion Error / Compiletion Successfully / Output ?

class M25 { public static void main(String[] args) { Double d1 = new Double(20); double d2 = d1.doubleValue(); System.out.println("done"); } }

26. Program

//Find what it gives Compiletion Error / Compiletion Successfully / Output ?


Page....