Updated Oct-2022 Test Engine to Practice Test for 1z0-808 Exam Questions and Answers!
Java SE 8 Programmer I Certification Sample Questions and Practice Exam
How to book the 1Z0-808 Exam
The following steps are for registering for the Oracle 1Z0-808 exam.
Step 1: Visit to PearsonVUE Website for 1Z0-808 exam Registration Step 2: Signup/Login to Pearson VUE account
NEW QUESTION 10
Given:
And given the code fragment:
What is the result?
- A. 300:00:300
- B. 200:300200:300
- C. 300:100200:300
- D. 300:300200:300
Answer: B
NEW QUESTION 11
Given:
What is the result?
- A. Bus
Vehicle - B. Bus
- C. Vehicle Bus
- D. The program doesn't print anything
Answer: C
Explanation:
NEW QUESTION 12
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?
- A. Encapsulation
- B. Inheritance
- C. Polymorphism
- D. Instantiation
- E. Abstraction
Answer: A
Explanation:
Explanation
Using the private modifier is the main way that an object encapsulates itself and hide data from the outside world.
References:
NEW QUESTION 13
Given the following classes:
Which two options fail to compile when placed at line n1 of the main method? (Choose two.)
- A. manager.stockOption = 500;
- B. director.stockOptions = 1_000;
- C. manager.budget = 1_000_000;
- D. employee.budget = 200_000;
- E. employee.salary = 50_000;
- F. director.salary = 80_000;
Answer: A,D
NEW QUESTION 14
Given:
What is the result?
- A. 400.0 : 200.0
- B. 400.0 : 100.0
- C. 200.0 : 100.0
- D. Compilation fails.
Answer: B
NEW QUESTION 15
Which two statements correctly describe checked exception?
- A. These are exceptional conditions that are internal to the application, and that the application usually cannot anticipate or recover from.
- B. Every class that is a subclass of Exception, excluding RuntimeException and its subclasses, is categorized as checked exception.
- C. These are exceptional conditions that a well-written application should anticipate and recover from.
- D. These are exceptional conditions that are external to the application, and that the application usually cannot anticipate or recover from.
- E. Every class that is a subclass of RuntimeException and Error is categorized as checked exception.
Answer: D,E
Explanation:
Checked exceptions:
*(B) represent invalid conditions in areas outside the immediate control of the program (invalid user input, database problems, network outages, absent files)
*are subclasses of Exception It's somewhat confusing, but note as well that RuntimeException (unchecked) is itself a subclass of Exception (checked).
*a method is obliged to establish a policy for all checked exceptions thrown by its implementation (either pass the checked exception further up the stack, or handle it somehow)
Reference: Checked versus unchecked exceptions
NEW QUESTION 16
Given the code fragment:
What is the result?
- A. Invalid Name
- B. Invalid Nameomas
- C. Invalid Nameomasnullnull
- D. omasterseph
Answer: C
NEW QUESTION 17
Given:
What is the result?
A:
B:
C:
D:
- A. Option B
- B. Option D
- C. Option C
- D. Option A
Answer: B
NEW QUESTION 18
Given:
And the code fragment:
Which code fragment, when inserted at line 14, enables the code to print Mike Found?
A:
B:
C:
D:
- A. Option B
- B. Option A
- C. Option D
- D. Option C
Answer: B
NEW QUESTION 19
Given:
What is the result?
- A. 0
- B. 1
- C. 2
- D. Compilation fails.
- E. 3
Answer: C
NEW QUESTION 20
Given:
Which code fragment, when inserted at line 9, enables the code to print true?
- A. String str2 = "Duke";
- B. String str2 = str1;
- C. String str2 = new string (str1);
- D. String str2 = sb1.toString();
Answer: C
NEW QUESTION 21
Given:
And:
What is the result?
- A. ns = 50 s = 50
ns = 125 s =125
ns = 100 s =100 - B. ns = 50 s = 50
ns = 125 s = 125
ns = 0 s = 125 - C. ns = 100 s =125
ns = 0 s = 125
ns = 125 s = 125 - D. ns = 50 s = 125
ns = 125 s = 125
ns = 0 s = 125
Answer: D
Explanation:
Explanation/Reference:
NEW QUESTION 22
Given the code fragment:
Which three code fragments are valid at line n1?
- A. public static void insertToy() {/* code goes here */}
- B. public void printToy();
- C. public abstract Toy getToy() {return new Toy();}
- D. public abstract int computeDiscount();
- E. public int calculatePrice() {return price;}
Answer: B,D,E
NEW QUESTION 23
Which two statements are true for a two-dimensional array of primitive data type?
- A. At the declaration time, the number of elements of the array in each dimension must be specified.
- B. The length of each dimension must be the same.
- C. All methods of the class object may be invoked on the two-dimensional array.
- D. It cannot contain elements of different types.
Answer: A,C
Explanation:
http://stackoverflow.com/questions/12806739/is-an-array-a-primitive-type-oran-object-or-something-else-entirely
NEW QUESTION 24
Given:
Which code fragment can replace the if block?
- A. res = stuff.equals ("TV") ? stuff.equals ("Movie")? "Walter" : "White" : "No Result";
- B. res = stuff.equals ("TV") ? "Walter" else stuff.equals ("Movie")? "White" : "No Result";
- C. stuff.equals ("TV") ? res= "Walter" : stuff.equals ("Movie") ? res = "White" : res = "No Result";
- D. res = stuff.equals ("TV")? "Walter" : stuff.equals ("Movie")? "White" : "No Result";
Answer: D
NEW QUESTION 25
Given:
And given the code fragment:
Which two modifications enable the code to print the following output?
Canine 60 Long
Feline 80 Short
- A. Replace line n1 with:this.bounds = bounds;super ();
- B. Replace line n1 with:this ("Canine", 60);this.bounds = bounds
- C. Replace line n1 with:super ();this.bounds = bounds;
- D. Replace line n2 with:super (type, maxSpeed);this (bounds);
- E. Replace line n2 with:super (type, maxSpeed);this.bounds = bounds;
Answer: C
NEW QUESTION 26
......
Certification dumps Java and Middleware 1z0-808 guides - 100% valid: https://www.actualtests4sure.com/1z0-808-test-questions.html
100% Pass Your 1z0-808 Java SE 8 Programmer I at First Attempt with Actualtests4sure: https://drive.google.com/open?id=1xZDuUih710aqHU8y8QriETAllGJ6D6Nn

