|
|

|
#1. Given: 1. interface A { public void aMethod(); } 2. interface B { public void aMethod(); } 3. interface C extends A,B { public void aMethod(); } 4. class D implements B { 5. } 6. Class E extends D implements C { 7. public void aMethod() {} 8. public void bMethod() {} 9. public void cMethod() {} 10. }
What is the result?
Показать комментарии к этому вопросу (0)
Добавить комментарии
Ссылка на этот вопрос
|
|
#5. Given: 1. class ClassA { 2. public int numberOfInstances; 3. protected ClassA(int numberOfInstances) { 4. this.numberOfInstances = number OfInstances; 5. } 6. } 7. public class ExtendedA extends ClassA { 8. private ExtendedA(int numberOfInstances) { 9. super(numberOfInstances); 10. } 11. public static void main (String[] args ) { 12. ExtendedA ext = new ExtendedA(420); 13. System. out. pint(ext. numberOfInstances); 14. } 15. }
Which statement is true?
Показать комментарии к этому вопросу (0)
Добавить комментарии
Ссылка на этот вопрос
|
|
#7. Given: 10. public class starter extends thread { 11. private int x = 2; 12. public static void main (String[] args ) 13. new Starter () .makeItSo(); 14. } 15. public Starter() { 16. x = 5; 17. start(); 18. } 19. public void makeItSo() throws 20. Join(); 21. x = x -1; 23. } 24. public void run() { x *= 2; } 25. }
What is the output if the main() method is run?
Показать комментарии к этому вопросу (0)
Добавить комментарии
Ссылка на этот вопрос
|
|
|
|
ген. 0.28
|
Дата сервера 11:52 09-01-2009
|
Разработал Zip © 2006
|
|
 |
|
|