Go to 1z0-808 Questions - Try 1z0-808 dumps pdf [Q131-Q155]

Share

Go to 1z0-808 Questions - Try 1z0-808 dumps pdf

Dumps Practice Exam Questions Study Guide for the 1z0-808 Exam

NEW QUESTION # 131
Which statement is true about Java byte code?

  • A. It can run on any platform.
  • B. It can run on any platform only if that platform has both the Java Runtime Environment and a Java compiler.
  • C. It can run on any platform that has a Java compiler.
  • D. It can run on any platform only if it was compiled for that platform.
  • E. It can run on any platform that has the Java Runtime Environment.

Answer: C

Explanation:
Reference: http://www.math.uni-hamburg.de/doc/java/tutorial/getStarted/intro/definition.html
Explanation:
Java bytecodes help make "write once, run anywhere" possible. You can compile your program into bytecodes on any platform that has a Java compiler. The bytecodes can then be run on any implementation of the Java VM. That means that as long as a computer has a Java VM, the same program written in the Java programming language can run on Windows 2000, a Solaris workstation, or on an iMac.


NEW QUESTION # 132
Given the code fragment:

What is the result?

  • A. (green, blue, yellow, cyan)
  • B. (green, red, yellow, cyan)
  • C. (green, red, cyan, yellow)
  • D. AnIndexOutOfBoundsExceptionis thrown at runtime.

Answer: C


NEW QUESTION # 133
Given the code fragment:

What is the result?

  • A. Compilation fails only at line n2
  • B. Jesse 25 Walter 52
  • C. Compilation fails only at line n1
  • D. Compilation fails at both line n1 and line n2

Answer: C


NEW QUESTION # 134
Given the code fragment:

What is the result?

  • A. Option B
  • B. Option D
  • C. Option C
  • D. Option A

Answer: C


NEW QUESTION # 135
Given:
abstract class A1 {
public abstract void m1();
public void m2() { System.out.println("Green"); }
}
abstract class A2 extends A1 {
public abstract void m3();
public void m1() { System.out.println("Cyan"); }
public void m2() { System.out.println("Blue"); }
}
public class A3 extends A2 {
public void m1() { System.out.println("Yellow"); }
public void m2() { System.out.println("Pink"); }
public void m3() { System.out.println("Red"); }
public static void main(String[] args) {
A2 tp = new A3();
tp.m1();
tp.m2();
tp.m3();
}
}
What is the result?

  • A. Compilation Fails
  • B. Yellow Pink Red
  • C. Cyan Green Red
  • D. Cyan Blue Red

Answer: B


NEW QUESTION # 136
Which three statements are true about the structure of a Java class? (Choose three.)

  • A. A class can have final static methods.
  • B. A public class must have a main method.
  • C. A class cannot have the same name as its field.
  • D. Methods and fields are optional components of a class.
  • E. A class can have overloaded private constructors.
  • F. Fields need to be initialized before use.

Answer: B,E,F


NEW QUESTION # 137
Given the code fragment:

Which two modifications, when made independently, enable the code to print Joe:true: 100.0? (Choose two.)

  • A. Option B
  • B. Option D
  • C. Option C
  • D. Option A
  • E. Option E

Answer: C,D


NEW QUESTION # 138
Given:

What is the result?

  • A. 100 0 : 100 0 :
  • B. 100 200 : 100 0 :
  • C. 100 200 : 100 200 :
  • D. 100 0 : 100 200:

Answer: B


NEW QUESTION # 139
Given the following classes: Which two options fail to compile when placed at line n1 of the main method?

  • A. manager.budget = 1_000_000;
  • B. employee.budget = 200_000;
  • C. employee.salary = 50_000;
  • D. director.salary = 80_000;
  • E. manager.stockOption = 500;
  • F. director.stockOptions = 1_000;

Answer: B,E


NEW QUESTION # 140
Given:

What is the result?

  • A. Base
    DerivedB
  • B. DerivedB
    DerivedA
  • C. A ClassCastException is thrown at runtime.
  • D. DerivedB
    DerivedB
  • E. Base
    DerivedA

Answer: D


NEW QUESTION # 141
Given the code fragment:

What is the result?

  • A. 5 : 10
  • B. Compilation fails.
  • C. 5 : 5
  • D. 10 : 10

Answer: D

Explanation:
Explanation/Reference:
Reference:


NEW QUESTION # 142
Given the code fragment:

Which option can replace xxx to enable the code to print 135?

  • A. int e = 0; e < = 4; e++
  • B. int e = 1; e < 5; e+ =2
  • C. int e = 1; e < = 5; e + = 1
  • D. int e = 0; e < 5; e + = 2

Answer: D


NEW QUESTION # 143
Given:

What is the result?

  • A. false, false
  • B. false, true
  • C. true, false
  • D. true, true

Answer: B


NEW QUESTION # 144
Given the following two classes:

How should you write methods in the ElectricAccount class at line n1 so that the member variable bill is always equal to the value of the member variable kwh multiplied by the member variable rate?
Any amount of electricity used by a customer (represented by an instance of the customer class) must contribute to the customer's bill (represented by the member variable bill) through the method useElectricity method. An instance of the customer class should never be able to tamper with or decrease the value of the member variable bill.

  • A. Option B
  • B. Option D
  • C. Option A
  • D. Option C

Answer: C


NEW QUESTION # 145
Given the following class declarations:
public abstract class Animal

public interface Hunter

public class Cat extends Animal implements Hunter

public class Tiger extends Cat

Which answer fails to compile?

  • A. Option E
  • B. Option B
  • C. Option D
  • D. Option A
  • E. Option C

Answer: A


NEW QUESTION # 146
Given the code fragment:

What is the result?

  • A. Compilation fails only at line n2
  • B. Compilation fails only at line n1
  • C. Compilation fails at both line n1 and line n2
  • D. Jesse 25
    Walter 52

Answer: B


NEW QUESTION # 147
Given the code fragment:

And given the requirements:
If the value of the qty variable is greater than or equal to 90, discount = 0.5 If the value of the qty variable is between 80 and 90, discount = 0.2 Which two code fragments can be independently placed at line n1 to meet the requirements? (Choose two.)

  • A. Option B
  • B. Option D
  • C. Option C
  • D. Option A
  • E. Option E

Answer: C,D


NEW QUESTION # 148
Given the code fragment:

Which three lines fail to compile? (Choose three.)

  • A. Line 12
  • B. Line 11
  • C. Line 10
  • D. Line 7
  • E. Line 8
  • F. Line 9

Answer: B,E,F


NEW QUESTION # 149
Given the following main method:

What is the result?

  • A. 5 4 3 2 1 0
  • B. 4 2 1
  • C. 5 4 3 2 1
  • D. 0
  • E. Nothing is printed

Answer: D


NEW QUESTION # 150
Given the code fragment:

Assume that the system date is June 20, 2014. What is the result?

  • A.
  • B. An exception is thrown at runtime.
  • C.
  • D. Compilation fails.

Answer: C


NEW QUESTION # 151
Given the following class declarations:
-public abstract class Animal -public interface Hunter -public class Cat extends Animalimplements Hunter -public class Tiger extends Cat
Which answer fails to compile?

  • A. Option E
  • B. Option B
  • C. Option D
  • D. Option A
  • E. Option C

Answer: A


NEW QUESTION # 152
Which three statements describe the object-oriented features of the Java language? (Choose three.)

  • A. A main method must be declared in every class.
  • B. Object is the root class of all other objects.
  • C. Objects cannot be reused.
  • D. Objects can share behaviors with other objects.
  • E. A subclass must override the methods from a superclass.
  • F. A package must contain a main class.

Answer: A,D,E


NEW QUESTION # 153
Given:

And the code fragment:

Which code fragment, when inserted at line 14, enables the code to print Mike Found?

  • A. Option B
  • B. Option D
  • C. Option A
  • D. Option C

Answer: C


NEW QUESTION # 154
Given the code fragment:

What is the result?

  • A. 0
  • B. 1
  • C. 2
  • D. Compilation fails
  • E. 3

Answer: D


NEW QUESTION # 155
......

Free Java and Middleware 1z0-808 Exam Question: https://www.lead1pass.com/Oracle/1z0-808-practice-exam-dumps.html

1z0-808 Dumps with Practice Exam Questions Answers: https://drive.google.com/open?id=1Jx98V2dzjf23n3Ci3IpGLSBXJjZ0hXu6