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 3673

Given:
5.    import java.util.Date;
6.    import java.text.DateFormat;
21.    DateFormat df;
22.    Date date = new Date();
23.    // insert code here
24.    String s = df.format(date);
Which code fragment, inserted at line 23, allows the code to compile?
 

Option A

A.    df = new DateFormat();
 

Option B

B.    df = Date.getFormat();
 

Option C

C.    df = date.getFormat();
 

Option D

D.    df = DateFormat.getFormat();
 

Option E

E.    df = DateFormat.getInstance();
 

Correct Answer E
Explanation


Question ID 3674

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

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