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

This preview shows page 1 - 5 out of 5 pages.

310-036 SUN SUN CERTIFIED JAVA 2 PROGRAMMER 1.4 UPGRADE
Answer: E QUESTION: 62 Click the Exhibit button. What is the result? 0 2
QUESTION: 63 Given: 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 here 8. } Which two are valid examples of method overriding when inserted at line 7? (Choose two.) }
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, E QUESTION: 64 Given: 1. public class ConstOver { 2. public ConstOver(int x, int y, int z) { 3. }

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture