java wrapper classes

java wrapper classes tutorial explained

#java #wrapper #classes

public class main {

public static void main(string[] args) {

// wrapper class = provides a way to use primitive data types as reference data types
// reference data types contain useful methods
// can be used with collections (ex.arraylist)

//primitive //wrapper
//- // -
// boolean boolean
// char character
// int integer
// double double

// autoboxing = the automatic conversion that the java compiler makes between the primitive types and their corresponding object wrapper classes
// unboxing = the reverse of autoboxing. automatic conversion of wrapper class to primitive

boolean a = true;
character b = '@';
integer c = 123;
double d = 3.14;

}

}

java wrapper classes