This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Wrapper Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Wrapper Class" Watch "Wrapper Class" New topic
Author

Wrapper Class

Hemant Gupt
Greenhorn

Joined: May 12, 2008
Posts: 26
Source : Marcus Green

Question 25)

What will happen if you attempt to compile and run the following code?

Integer ten=new Integer(10);Long nine=new Long (9);System.out.println(ten + nine);int i=1;System.out.println(i + ten);
1) 19 followed by 20
2) 19 followed by 11
3) Compile time error
4) 10 followed by 1

What would be the right choice ?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Did you try to run it ?


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
 
 
subject: Wrapper Class
 
Similar Threads
Wrapper Question
Qn on Wrapper classes.
Wrapper class
Marcus Green Exam 1 Question 25
Marcus Green Q25