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 3895

Given a class Repetition:
1.    package utils;
2.    
3.    public class Repetition {
4.    public static String twice(String s) { return s + s; }
5.    } and given another class Demo:
1.    // insert code here
2.    
3.    public class Demo {
4.    public static void main(String[] args) {
5.    System.out.println(twice("pizza"));
6.    }
7.    }
Which code should be inserted at line 1 of Demo.java to compile and run Demo to print "pizzapizza"?
 

Option A

A.    import utils.*;
 

Option B

B.    static import utils.*;
 

Option C

C.    import utils.Repetition.*;
 

Option D

D.    static import utils.Repetition.*;
 

Option E

E.    import utils.Repetition.twice();
 

Option F

F.    import static utils.Repetition.twice;
 

Correct Answer F
Explanation


Question ID 3896

Given:
1.    interface DoStuff2 {
2.    float getRange(int low, int high); }
3.    
4.    interface DoMore {
5.    float getAvg(int a, int b, int c); }
6.    
7.    abstract class DoAbstract implements DoStuff2, DoMore { }
8.    
9.    class DoStuff implements DoStuff2 {
10.    public float getRange(int x, int y) { return 3.14f; } }
11.    
12.    interface DoAll extends DoMore {
13.    float getAvg(int a, int b, int c, int d); } What is the result?
 

Option A

A.    The file will compile without error.
 

Option B

B.    Compilation fails. Only line 7 contains an error.
 

Option C

C.    Compilation fails. Only line 12 contains an error.
 

Option D

D.    Compilation fails. Only line 13 contains an error.
 

Correct Answer A
Explanation

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