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...

11. static class A {
12. void process() throws Exception { throw new Exception();
}
13. }
14. static class B extends A {
15. void process() { System.out.println(”B”); }
16. }
17. public static void main(String[] args) {
18. new B().process();
19. }
What is the result?
1 B
2 The code runs with no output.
3 Compilation fails because of an error in
line 12.
4 Compilation fails because of an error in
line 15.

Answer Posted / manikandan [ gtec,vellore ]

Answer is 1)B because we directly calling a process method
in class B

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of a copy constructor?

992


What is the purpose of the strictfp keyword?

1164


What class of exceptions are generated by the java run-time system?

1190


Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?

1119


What is array and arraylist in java?

1117


What is type conversion in java?

1045


What are the differences between abstract class and interface?

1095


Is 64bit faster than 32 bit?

1072


What are the advantages of compiled language?

1079


What is methodological framework?

1048


What is a “stateless” protocol ?

993


What are the three parts of a lambda expression?

1016


Can singleton class be serialized?

953


Which is easier .net or java?

1089


How do constructors use this() and super()?

1122