Oracle 1z0-808 Exam Practice Questions (P. 1)
- Full Access (234 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #1
Given:

What is the result?

What is the result?
- A200.0 : 100.0
- B400.0 : 200.0
- C400.0 : 100.0Most Voted
- DCompilation fails.
Correct Answer:
C
C
send
light_mode
delete
Question #2
Which statement is true about the switch statement?
- AIt must contain the default section.
- BThe break statement, at the end of each case block, is optional.Most Voted
- CIts case label literals can be changed at runtime.
- DIts expression must evaluate to a collection of values.
Correct Answer:
B
B

The correct option is B: the break statement is indeed optional in a switch-case block. Not using a break can sometimes be strategic for a technique known as "fall-through", where execution continues from one case to the next intentionally. This can be useful, for example, in grouped case scenarios without repetitive code.
send
light_mode
delete
Question #3
Given the code fragment:

What is the result?

What is the result?
- AMay 04, 2014T00:00:00.000
- B2014-05-04T00:00: 00.000
- C5/4/14T00:00:00.000
- DAn exception is thrown at runtime.Most Voted
Correct Answer:
B
B
send
light_mode
delete
Question #4
Given the code fragment:

What is the result?

What is the result?
- ASum is 600
- BCompilation fails at line n1.
- CCompilation fails at line n2.Most Voted
- DA ClassCastException is thrown at line n1.
- EA ClassCastException is thrown at line n2.
Correct Answer:
C
C
send
light_mode
delete
Question #5
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?
- AEncapsulationMost Voted
- BInheritance
- CAbstraction
- DInstantiation
- EPolymorphism
Correct Answer:
A
Using the private modifier is the main way that an object encapsulates itself and hide data from the outside world.
Reference:
http://www.tutorialspoint.com/java/java_access_modifiers.htm
A
Using the private modifier is the main way that an object encapsulates itself and hide data from the outside world.
Reference:
http://www.tutorialspoint.com/java/java_access_modifiers.htm
send
light_mode
delete
All Pages