In Java, we have primitive data types such as long, short, Boolean, int, float and so on. You can use wrapper classes to convert primitive data types to objects like this: public static void Calculation()
{
int a = 2;
Integer obj = new Integer(a);
System.out.println(obj.toString());
} In this code…