You are here: Home / Topics / Program to use expression with Wrapper classes in Java

Program to use expression with Wrapper classes in Java

Filed under: Java on 2023-09-19 08:09:17

//  Program to use expression with Wrapper classes.

class Wrapper5
{
public static void main(String args[ ]) 
{
 Integer iOb = 100;
 Double dOb = 123.45;

 dOb = dOb + iOb;
 System.out.println("dOb after expression: " + dOb);
}
}


Output:

dOb after expression: 223.45

About Author:
M
Mr. Dubey     View Profile
Founder and CEO of MCQ Buddy. I just like to help others.