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 22674

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

import utils.*;

Option B

static import utils.*;

Option C

import utils.Repetition.*;

Option D

static import utils.Repetition.*;

Option E

import utils.Repetition.twice();

Option F

import static utils.Repetition.twice;

Correct Answer F
Explanation


Question ID 22675

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

The file will compile without error.

Option B

Compilation fails. Only line 7 contains an error.

Option C

Compilation fails. Only line 12 contains an error.

Option D

Compilation fails. Only line 13 contains an error.

Option E

Compilation fails. Only lines 7 and 12 contain errors.

Option F

Compilation fails. Only lines 7 and 13 contain errors.

Correct Answer A
Explanation

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