12
Java SE 8 Programmer I Version: Demo [ Total Questions: 10] Web: www.marks4sure.com Email: [email protected] Oracle 1z0-808

Oracle - marks4sure.com · Practice Test Oracle - 1z0-808 Pass Your Certification With Marks4sure Guarantee 7 of 9 How should you write methods in the ElectricAccount class …

Embed Size (px)

Citation preview

Java SE 8 ProgrammerI

Version: Demo

[ Total Questions: 10]

Web: www.marks4sure.com

Email: [email protected]

Oracle

1z0-808

IMPORTANT NOTICE

Feedback

We have developed quality product and state-of-art service to ensure our customers interest. If you have anysuggestions, please feel free to contact us at [email protected]

Support

If you have any questions about our product, please provide the following items:

exam codescreenshot of the questionlogin id/email

please contact us at and our technical experts will provide support within 24 [email protected]

Copyright

The product of each order has its own encryption code, so you should use it independently. Any unauthorizedchanges will inflict legal punishment. We reserve the right of final explanation for this statement.

Oracle - 1z0-808Practice Test

1 of 9Pass Your Certification With Marks4sure Guarantee

A.

B.

C.

D.

Question #:1

Given:

What is the result?

200.0 : 100.0

400.0 : 200.0

400.0 : 100.0

Compilation fails.

Answer: C

Question #:2

Given the code fragment:

What is the result if the integer aVar is 9?

Oracle - 1z0-808Practice Test

2 of 9Pass Your Certification With Marks4sure Guarantee

A.

B.

C.

D.

A.

B.

C.

D.

10 Hello World!

Hello Universe!

Hello World!

Compilation fails.

Answer: A

Question #:3

Given the code fragment:

What is the result?

May 04, 2014T00:00:00.000

2014-05-04T00:00: 00. 000

5/4/14T00:00:00.000

An exception is thrown at runtime.

Answer: D

Question #:4

Given the code fragment:

Oracle - 1z0-808Practice Test

3 of 9Pass Your Certification With Marks4sure Guarantee

A.

B.

C.

D.

E.

A.

B.

C.

D.

E.

What is the result?

Sum is 600

Compilation fails at line n1.

Compilation fails at line n2.

A ClassCastException is thrown at line n1.

A ClassCastException is thrown at line n2.

Answer: C

Question #:5

What is the name of the Java concept that uses access modifiers to protect variables and hide them within aclass?

Encapsulation

Inheritance

Abstraction

Instantiation

Polymorphism

Answer: A

Explanation

Using the private modifier is the main way that an object encapsulates itself and hide data from the outsideworld.

References:

Question #:6

Given the code fragment:

Oracle - 1z0-808Practice Test

4 of 9Pass Your Certification With Marks4sure Guarantee

A.

B.

C.

D.

E.

Which two modifications, made independently, enable the code to compile?

Make the method at line n1 public.

Make the method at line n2 public.

Make the method at line n3 public.

Make the method at line n3 protected.

Make the method at line n4 public.

Answer: C D

Question #:7

Given:

Oracle - 1z0-808Practice Test

5 of 9Pass Your Certification With Marks4sure Guarantee

A.

B.

C.

D.

E.

And given the code fragment:

What is the result?

4W 100 Auto4W 150 Manual

Null 0 Auto4W 150 Manual

Compilation fails only at line n1

Compilation fails only at line n2

Compilation fails at both line n1 and line n2

Answer: C

Question #:8

fragment:

Oracle - 1z0-808Practice Test

6 of 9Pass Your Certification With Marks4sure Guarantee

A.

B.

C.

D.

E.

Which two modifications should you make so that the code compiles successfully?

Option A

Option B

Option C

Option D

Option E

Answer: A C

Question #:9

Given the following two classes:

Oracle - 1z0-808Practice Test

7 of 9Pass Your Certification With Marks4sure Guarantee

How should you write methods in the ElectricAccount class at line n1 so that the member variable bill isalways 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) mustcontribute to the customer's bill (represented by the member variable bill) through the method use Electricitymethod. An instance of the customer class should never be able to tamper with or decrease the value of themember variable bill.

Oracle - 1z0-808Practice Test

8 of 9Pass Your Certification With Marks4sure Guarantee

A.

B.

C.

D.

Option A

Option B

Option C

Option D

Answer: A C

Question #:10

Given the code fragment:

Oracle - 1z0-808Practice Test

9 of 9Pass Your Certification With Marks4sure Guarantee

A.

B.

C.

D.

What is the result?

Match 1

Match 2

No Match

A NullPointerException is thrown at runtime.

Answer: B

About Marks4sure.commarks4sure.com was founded in 2007. We provide latest & high quality IT / Business Certification Training ExamQuestions, Study Guides, Practice Tests.

We help you pass any IT / Business Certification Exams with 100% Pass Guaranteed or Full Refund. EspeciallyCisco, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on.

View list of all certification exams: All vendors

We prepare state-of-the art practice tests for certification exams. You can reach us at any of the email addresses listedbelow.

Sales: [email protected]: [email protected]: [email protected]

Any problems about IT certification or our products, You can write us back and we will get back to you within 24hours.