Course Hero Logo

310-036.pdf - SUN 310-036 SUN CERTIFIED JAVA 2 PROGRAMMER...

Doc Preview
Pages 5
Identified Q&As 8
Solutions available
Total views 1
310-036SUNSUN CERTIFIED JAVA 2 PROGRAMMER 1.4 UPGRADE
Answer:EQUESTION:62Click the Exhibit button.What is the result?02
View full document
QUESTION:63Given:1. class BaseClass {2.private float x = 1.0f;3.protected void setVar(float f) { x = f;}4. }5. class SubClass extends BaseClass {6.private float x = 2.0f;7. // insert code here8. }Which two are valid examples of method overriding when inserted at line 7? (Choose two.)}
View full document
31
B.public void setVar(int f) { x = f;}C.public void setVar(float f) { x = f;}D.public double setVar(float f) { return f;}E.public final void setVar(float f) { x = f;}F.protected float setVar() { x = 3.0f; return 3.0f;}Answer:C, EQUESTION:64Given:1. public class ConstOver {2.public ConstOver(int x, int y, int z) {3.}
Course Hero Badge

End of preview

Want to read all 5 pages? Upload your study docs or become a member.

Unformatted text preview: protected int ConstOver() { } C. private ConstOver(int z, int y, byte x) { } D. public Object ConstOver(int x, int y, int z) { } E. public void ConstOver(byte x, byte y, byte z) { } Answer: A, C QUESTION: 65 Given: 11. interface AnInterface { } 12. class AnAdapter0 { 13. AnAdapter0() { } 14. } 15. class AnAdapter1 { 16. AnAdapter1(int i) { } 17. } Which two build an anonymous inner class? (Choose two.) A. AnAdapter1 aa = new AnAdapter1(){ } B. AnAdapter0 aa = new AnAdapter0() { } C. AnAdapter0 aa = new AnAdapter0(5){ } D. AnAdapter1 aa = new AnAdapter1(5){ } E. AnInterface ai = new AnInterface (5) { } Answer: B, D 32 QUESTION: 66 Click the Exhibit button. What is the result when main is executed? A. Compilation fails. B. hello from a C. hello from b D. hello from b hello from a E. hello from a hello from b Answer: A 33 For More exams visit http s ://killexams.com /vendors-exam-list Kill your exam at First Attempt .... Guaranteed!...
View Full Document