AllExam Dumps

DUMPS, FREE DUMPS, VCP5 DUMPS| VMWARE DUMPS, VCP DUMPS, VCP4 DUMPS, VCAP DUMPS, VCDX DUMPS, CISCO DUMPS, CCNA, CCNA DUMPS, CCNP DUMPS, CCIE DUMPS, ITIL, EXIN DUMPS,


READ Free Dumps For Oracle- 1z0-851





Question ID 3745

Given:
1.    interface TestA { String toString(); }
2.    public class Test {
3.    public static void main(String[] args) {
4.    System.out.println(new TestA() {
5.    public String toString() { return "test"; }
6.    });
7.    }
8.    }
What is the result?

 

Option A

A.    test
 

Option B

B.    null
 

Option C

C.    An exception is thrown at runtime.
 

Option D

D.    Compilation fails because of an error in line 1.
 

Option E

E.    Compilation fails because of an error in line 4.
 

Option F

F.    Compilation fails because of an error in line 5.

Correct Answer A
Explanation


Question ID 3747

Given:
10.    abstract public class Employee {
11.    protected abstract double getSalesAmount();
12.    public double getCommision() {
13.    return getSalesAmount() * 0.15;
14.    }
15.    }
16.    class Sales extends Employee {
17.    // insert method here
18.    }
Which two methods, inserted independently at line 17, correctly complete the Sales class? (Choose two.)
 

Option A

A.    double getSalesAmount() { return 1230.45; }
 

Option B

B.    public double getSalesAmount() { return 1230.45; }
 

Option C

C.    private double getSalesAmount() { return 1230.45; }
 

Option D

D. protected double getSalesAmount() { return 1230.45; }
 

Correct Answer B,D
Explanation

Send email to admin@getfreedumps for new dumps request!!!