Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Given:
11. public static void main(String[] args) {
12. Integer i = uew Integer(1) + new Integer(2);
13. switch(i) {
14. case 3: System.out.println(”three”); break;
15. default: System.out.println(”other”); break;
16. }
17. }
‘What is the result?
1 three
2 other
3 An exception is thrown at runtime.
4 Compilation fails because of an error on
line 12.

Answer Posted / kumar

The above scenario using Wrapper class.The Wrapper class
allows arthmetic opertion(Boxing and unboxing the interget
numbers).So the result will be "three"

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain java coding standards for methods?

1024


What is the difference between class & structure?

1201


How does thread synchronization occurs inside a monitor?

1087


What are the restrictions imposed on method overriding?

994


What is callablestatement? How you can call stored procedure to pass in parameter?

1017


Can we call the constructor of a class more than once for an object?

1076


Difference between java and javascript

1075


what is object-oriented programming in java?

1032


What is the purpose of tostring() method in java?

1132


Write java program to reverse string without using api?

1035


What are the restrictions that are applied to the java static methods?

969


A person says that he compiled a java class successfully without even having a main method in it? Is it possible?

1035


What is number data type?

1013


Can we assign the reference to this variable?

953


Explain, java is compatible with all servers but not all browsers?

1045