Explain the inheritance?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

What are the files generated after using IDL to java compiler?

0 Answers  


Why does my function print none?

0 Answers  


What are strings in physics?

0 Answers  


Can a class declared as private be accessed outside it’s package?

0 Answers  


What interface is extended by awt event listeners?

0 Answers  


is set interface synchronized by default???

2 Answers   Manhattan,


Given: 10. interface A { void x(); } 11. class B implements A { public void x() { } public voidy() { } } 12. class C extends B { public void x() {} } And: 20. java.util.List list = new java.util.ArrayList(); 21. list.add(new B()); 22. list.add(new C()); 23. for (A a:list) { 24. a.x(); 25. a.y();; 26. } What is the result? 1 Compilation fails because of an error in line 25. 2 The code runs with no output. 3 An exception is thrown at runtime. 4 Compilation fails because of an error in line 20.

3 Answers  


What is the difference between a scrollbar and a scrollpane?

0 Answers  


suppose in a class there is a code like this: { Set hs=new Hashset(); hs.add(new Emp("kathy",1000)); hs.add(new Emp("kathy",2000)); } how can u avoid the above code in your class as set won't allow duplicate objects?

3 Answers  


Does java support multi dimensional arrays ?

6 Answers  


What are implicit objects in java?

0 Answers  


What are the three best choices for a development environment?

0 Answers  


Categories