Opening Hours :7AM to 9PM
public class Addition { public static void main(String args[]) { System.out.println("Before converting "+(args[0]+args[1])); } }Output
Wrapper classes | |||
Constants | Wrapper Class | Datatype | Method |
Integer | Byte | byte | x=Byte.parseByte(args[0]) |
Short | short | x=Short.parseShort(args[0]) | |
Integer | int | x=Integer.parseInt(args[0]) | |
Long | long | x=Long.parseLong(args[0]) | |
Floating point | Float | float | x=Float.parseFloat(args[0]) |
Double | double | x=Double.parseDouble(args[0]) | |
Character | Character | char | x=args[0].charAt(0) |
String | String | String | x=args[0] |
public class Addition { public static void main(String args[]) { System.out.println("Before Converting : "+(args[0]+args[1])); int x,y,z; x=Integer.parseInt(args[0]); y=Integer.parseInt(args[1]); z=x+y; System.out.println("After Converting : "+z); } }OUTPUT: