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-804





Question ID 21427

Given:
public class Runner {
public static String name = "unknown";
public void start() {
System.out.println(name);
}
public static void main(String[] args) {
name = "Daniel";
start();
}
}
What is the result?

Option A

Daniel

Option B

Unknown

Option C

It may print"unknown"or"Daniel"depending on the JVM implementation.

Option D

Compilation fails.

Option E

An exception is thrown at runtime.

Correct Answer D
Explanation Explanation: The compilation fails at line start(); Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - non-static method start() cannot be referenced from a static context


Question ID 21428

Which four are true about enums?

Option A

An enum is typesafe.

Option B

An enum cannot have public methods or fields.

Option C

An enum can declare a private constructor.

Option D

All enums implicitly implement Comparable.

Option E

An enum can subclass another enum.

Option F

An enum can implement an interface.

Correct Answer A,C,D,F
Explanation Explanation: C: The constructor for an enum type must be package-private or private access. Reference: Java Tutorials,Enum Types

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