Demo Example:public class Demo {
public static void main(String[] args) {
Demo d = new Demo();
String msg = [Link]("Rama");
[Link](msg);
}
public String getWish(String name) {
return "good morning ! " + name;
}
}
Boxing, Un Boxing,Auto boxing,Parsing Example:public class Demo {
public static void main(String[] args) {
int a = 10; // Primitive data type
Integer b = 100; // Reference data type
Integer i = new Integer(a); // Boxing
int j = [Link](); // Unboxing
Integer k = a; // Auto Boxing
String s = "500";
int y = [Link](s);// Parsing String to primitive type
int
float f = [Link](s);// Parsing String to primitive
type float
long l = [Link](s); // Parsing String to primitive
type long
[Link]("i value is.." + i);
[Link]("j value is.." + j);
[Link]("k value is.." + k);
[Link]("y value is.." + y);
[Link]("f value is.." + f);
[Link]("l value is.." + l);
}
}