example of wrapper class in java
Example 1: wrapper classes in java
Wrapper classes: classes that are dedicated to primitives
Byte, Short, Integer, Long, Float, Double, Character, Boolean
presented in "java.lang" package
AutoBoxing: converting primitive values to wrapper class
int a = 100;
Integer b = a
Unboxing: converting wrapper class value to primitives
Integer a = 100;
int b = a;
int a = 100;
double b = a;
Example 2: wrapper classes in java ebhor.com
public class CommandLineArguments {
public static void main(String[] args) {
int a = Integer.parseInt(args[0]);
int b = Integer.parseInt(args[1]);
int sum = a + b;
System.out.println("Sum is " + sum);
}
}