Download Java SE 8 Programmer.test-inside.1z0-808.2020-05-13.1e.121q.vcex

Download Exam

File Info

Exam Java SE 8 Programmer
Number 1z0-808
File Name Java SE 8 Programmer.test-inside.1z0-808.2020-05-13.1e.121q.vcex
Size 7.82 Mb
Posted May 13, 2020
Downloads 14

How to open VCEX & EXAM Files?

Files with VCEX & EXAM extensions can be opened by ProfExam Simulator.

Purchase
Coupon: EXAM_HUB

Discount: 20%

 
 



Demo Questions

Question 1
Which statement is true about the switch statement? 

  • A: It must contain the default section.
  • B: The break statement, at the end of each case block, is optional.
  • C: Its case label literals can be changed at runtime.
  • D: Its expression must evaluate to a collection of values.



Question 2
Given the code fragment:

   

What is the result? 

  • A: Sum is 600
  • B: Compilation fails at line n1.
  • C: Compilation fails at line n2.
  • D: A ClassCastException is thrown at line n1.
  • E: A ClassCastException is thrown at line n2.



Question 3
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: Abstraction
  • D: Instantiation
  • E: Polymorphism



Question 4
Given:

   

What is the result?

  • A: Compilation fails at line n1.
  • B: Initialized 
    Started 
    Initialized
  • C: Initialized 
    Started
  • D: Compilation fails at line n2.



Question 5
Given these two classes:

   

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 useElectricity method.  
An instance of the Customer class should never be able to tamper with or decrease the value of the member variable bill. 
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?

  • A:
       
  • B:
       
  • C:
       
  • D:
       



Question 6
Given the code fragment:

   

What is the result?

  • A: Match 1
  • B: Match 2
  • C: No Match
  • D: A NullPointerException is thrown at runtime.



Question 7
Given:

   

And given the code fragment:
Book book1 = new EBook(); 
book1.readBook(); 
Which option enables the code to compile? 

   

  • A: Option A 
  • B: Option B
  • C: Option C
  • D: Option D



Question 8
Given the code fragment:

   

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

  • A:
       
  • B:
       
  • C:
       
  • D:
       



Question 9
Which statement best describes encapsulation? 

  • A: Encapsulation ensures that classes can be designed so that only certain fields and methods of an object are accessible from other objects.
  • B: Encapsulation ensures that classes can be designed so that their methods are inheritable.
  • C: Encapsulation ensures that classes can be designed with some fields and methods declared as abstract.
  • D: Encapsulation ensures that classes can be designed so that if a method has an argument MyType x, any subclass of MyType can be passed to that method.



Question 10
Given this class:

   

And given this main method, located in another class:

   

Which three lines, when inserted independently at line n1, cause the program to print a 0 balance? (Choose three.) 

  • A: acct.setAmount(-acct.getAmount());
  • B: acct.amount = 0; <option D earlier>
  • C: acct.setAmount(0);
  • D: acct.getAmount() = 0; <option E earlier>
  • E: this.amount = 0; <option A earlier>
  • F: acct.changeAmount(0); <option F earlier>
  • G: acct.changeAmount(-acct.amount); <option G earlier>






CONNECT US


ProfExam
PROFEXAM WITH A 20% DISCOUNT

You can buy ProfExam with a 20% discount..

Get Now!


HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen



HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset