What are the Data Types supported by Java? What is Autoboxing and Unboxing?

Technology CommunityCategory: JavaWhat are the Data Types supported by Java? What is Autoboxing and Unboxing?
VietMX Staff asked 3 years ago

The eight primitive data types supported by the Java programming language are:

  • byte
  • short
  • int
  • long
  • float
  • double
  • boolean
  • char

Autoboxing is the automatic conversion made by the Java compiler between the primitive types and their corresponding object wrapper classes. If the conversion goes the other way, this operation is called unboxing.