import java.io.*; public class Conversions { public static void main(String args[]) throws Exception { int a,b; DataInputStream dis=new DataInputStream(System.in);
//String to Fundamental conversion System.out.print("Enter any integer value: "); a=Integer.parseInt(dis.readLine()); //Fundamental to Object conversion System.out.println("Before fundamental to object conversion"); System.out.println("a+10 value: "+(a+10)+"\t\t\ta+20 value: "+(a+20)); System.out.println("After fundamental to object conversion"); Integer io=new Integer(a); io++; io=io+2; System.out.println(io); System.out.println("Object data is modified"); }
}
Ads