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 / venkata krishna

Hi,

Answer is 1 means three..

line 12 is executing sucuessfully ,after that i is 3 now
line 13 is switch also executed successfully and print the
three

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is synchronization and why is it important in java programming?

919


How do you do exponents in java?

1025


Are arrays primitive data types?

1161


What is a type parameter in java?

980


How concurrent hashmap works?

1171


Tell us something about set interface.

982


Explain garbage collection in java?

959


What is the difference between yielding and sleeping?

1092


What are the main uses of java?

979


What is int argc char * argv?

1132


Is minecraft 1.15 out?

965


What is set string?

1154


What is java virtual machine? Explain

1011


What things should be kept in mind while creating your own exceptions in java?

1144


When should I use a singleton?

1016