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

Why is multithreading important?

891


Can a constructor call another constructor?

924


How many return statement are allowed in a function?

886


What is a bubble sort in java?

901


What are the three best choices for a development environment?

1051


What do you understand by Header linked List?

1036


what happens when a thread cannot acquire a lock on an object? : Java thread

1014


What is application system?

890


What is the arraylist in java?

983


Is set thread safe java?

870


What is array length?

932


Explain the selection sort algorithm and state its time complexity?

967


What is the replace tool?

1070


define the terminology association.

1048


Is it possible to compare various strings with the help of == operator? What are the risks involved?

1023