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 22672

Given:
1. package com.company.application;
2.
3. public class MainClass {
4. public static void main(String[] args) {}
5. } And MainClass exists in the /apps/com/company/application directory. Assume the
CLASSPATH environment variable is set to "." (current directory).
Which two java commands entered at the command line will run MainClass? (Choose two.)

Option A

java MainClass if run from the /apps directory

Option B

java com.company.application.MainClass if run from the /apps directory

Option C

java -classpath /apps com.company.application.MainClass if run from any directory

Option D

java -classpath . MainClass if run from the /apps/com/company/application directory

Option E

java -classpath /apps/com/company/application:. MainClass if run from the /apps directory

Option F

java com.company.application.MainClass if run from the /apps/com/company/application directory

Correct Answer B,C
Explanation


Question ID 22673

Given:
3. public class Batman {
4. int squares = 81;
5. public static void main(String[] args) {
6. new Batman().go();
7. }
8. void go() {
9. incr(++squares);
10. System.out.println(squares);
11. }
12. void incr(int squares) { squares += 10; }
13. }
What is the result?

Option A

81

Option B

82

Option C

91

Option D

92

Option E

Compilation fails.

Option F

An exception is thrown at runtime.

Correct Answer B
Explanation

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