|
|
Authorized user can see question and answers. Please log in or sign up. 
|
#12. Given: 11. interface DeclareStuff { 12. public static final mt EASY = 3; 13. void doStuff(intt); } 14. public class TestDeclare implements DeclareStuff { 15. public static void main (String [] args ) { 16. int x = 5; 17. new TestDeclare().doStuff(++x); 18. ) 19. void doStuff(int s) { 20. s += EASY + ++s; 21. System. out. println(”s + s ); 22. } 23. }
What is the result?
Show comments for this question (0)
Add comments
Link to this question
|
|
#13. Given: 1. interface DoStuff2 { 2. float getRange(int low, int high); } 3. 3. 4. interface DoMore { 5. float getAvg(int a, int b, mt c); } 6. 6. 7. abstract class DoAbstract implements DoStuff2, DoMore { } 8. 8. 9. class Dostuff implements Dostuff2 { 10. public float getRange(Intx, inty) { return 3.14f; } } 11. interface DoAII extends DoMore { 12. float getAvg(int a, int b, int c, int d); }
What is the result?
Show comments for this question (0)
Add comments
Link to this question
|
|
#16. Given: 10. interface Foo { 11. int bar (); 12. } 13. 14. public class Beta { 15. 16. class A implements Foo { 17. public int bar( ) { return 1; } 18. } 19. 20. public int fubar( Foo foo ) { return foo.bar( ) ; } 21. 22. public void testFoo( ) { 23. 24. class A implements Foo { 25. public int bar() { return 2; } 26. } 27. 28. System. out. printIn( fubar ( new A ( ) ) ); 29. } 30. 31. pubic static void main ( String[] argv ) } 32. New Beta(). testFoo(); 33. } 34. }
Which three statements are true? (Choose three.)
Show comments for this question (0)
Add comments
Link to this question
|
|
#19. Given: 1. public interface A { 2. public void doSomething (String thing ); 3. } 1. public class AImpI implements A { 2. public void doSomething (String msg ) { } 3. } 1. public class B 2. public A doit( ) { 3. // more code here 4. } 5. 6. public execute String execute () { 7. // more code here 8. } 9. } 1. public class C extends B { 2. public AImpI doit( ) { 3. // more code here 4. } 5. 7. // more code here 8. } 9. } 1. public object execute() { 2. public AImpI doit() { 3. // more code here 4. } 5. 7. //more code here 8. } 9. }
Which statement is true about the classes and interfaces in the exhibit?
Show comments for this question (0)
Add comments
Link to this question
|
|
|
|
gen. 0.359
|
Server date 05:39 10-01-2009
|
Developed by Zip © 2006
|
|
 |
|
|