Non - Primitive Datatypes
Wrapper Class
👉 Program 1class wrap
{
public static void main(String wrp[])
{
//primitive declaration
int p = 100;
System.out.println("primitive datatype = " +p);
//non-primitive declaration
Integer h = new Integer(100);
System.out.println("non-primitive datatype = " +h
);
Double d = new Double(2.1756);
System.out.println("non-primitive datatype = " +d);
Character c = new Character('K');
System.out.println("non-primitive datatype = " +c);
}
}
Output