Exam Title: Java SE 8 Programmer I
Exam Number: 1Z0-808
Exam Price: $245.00 More on exam pricing
Format: Multiple Choice
Duration: 150
Number of Questions: 70
Passing Score: 65%
Validated Against: This exam has been written for the Java SE 8 release, Java SE, Java SE 8 Programmer I

This exam has been written for the Java SE 8 release.
Associated Certification Paths

Passing this exam is required to earn these certifications. Select each certification title below to view full requirements.

Oracle Certified Associate, Java SE 8 Programmer
Exam Preparation
Recommended Training
Take Recommended Training Courses

Complete one of the courses below to prepare for your exam (optional):

Java SE 8 Fundamentals

Additional Preparation and Information

A combination of Oracle training and hands-on experience (attained via labs and/or field experience) provides the best preparation for passing the exam.

Also available in Spanish – 1Z0-808-ESN on the Pearson VUE website.

(Spanish version of the exam has 150 minutes duration, 70 questions and 65% passing score)

Exam Preparation
Certification Exam Prep Seminar: Java SE 8 Programmer I
Exam Prep Seminar Package: Java SE 8 Programmer I
Practice Exams: Oracle Authorized practice exam from Kaplan IT Training: 1Z0-808: Java SE 8 Programmer I
Sample Questions

Java Basics
Define the scope of variables
Define the structure of a Java class
Create executable Java applications with a main method; run a Java program from the command line; produce console output
Import other Java packages to make them accessible in your code
Compare and contrast the features and components of Java such as: platform independence, object orientation, encapsulation, etc.

Using Operators and Decision Constructs
Use Java operators; use parentheses to override operator precedence
Test equality between Strings and other objects using == and equals ()
Create if and if/else and ternary constructs
Use a switch statement

Using Loop Constructs
Create and use while loops
Create and use for loops including the enhanced for loop
Create and use do/while loops
Compare loop constructs
Use break and continue

Working with Inheritance

Describe inheritance and its benefits
Develop code that makes use of polymorphism; develop code that overrides methods; differentiate between the type of a reference and the type of an object
Determine when casting is necessary
Use super and this to access objects and constructors
Use abstract classes and interfaces

Working with Selected classes from the Java API
Manipulate data using the StringBuilder class and its methods
Create and manipulate Strings
Create and manipulate calendar data using classes from java.time.LocalDateTime, java.time.LocalDate, java.time.LocalTime, java.time.format.DateTimeFormatter, java.time.Period
Declare and use an ArrayList of a given type
Write a simple Lambda expression that consumes a Lambda Predicate expression

Assume the following:
Missing package and import statements: If sample code do not include package or import statements, and the question does not explicitly refer to these missing statements, then assume that all sample code is in the same package, or import statements exist to support them.
No file or directory path names for classes: If a question does not state the file names or directory locations of classes, then assume one of the following, whichever will enable the code to compile and run:
All classes are in one file
Each class is contained in a separate file, and all files are in one directory
Unintended line breaks: Sample code might have unintended line breaks. If you see a line of code that looks like it has wrapped, and this creates a situation where the wrapping is significant (for example, a quoted String literal has wrapped), assume that the wrapping is an extension of the same line, and the line does not contain a hard carriage return that would cause a compilation failure.
Code fragments: A code fragment is a small section of source code that is presented without its context. Assume that all necessary supporting code exists and that the supporting environment fully supports the correct compilation and execution of the code shown and its omitted environment.
Descriptive comments: Take descriptive comments, such as “setter and getters go here,” at face value. Assume that correct code exists, compiles, and runs successfully to create the described effect.

Working With Java Data Types

Declare and initialize variables (including casting of primitive data types)
Differentiate between object reference variables and primitive variables
Know how to read or write to object fields
Explain an Object’s Lifecycle (creation, “dereference by reassignment” and garbage collection)
Develop code that uses wrapper classes such as Boolean, Double, and Integer

Creating and Using Arrays
Declare, instantiate, initialize and use a one-dimensional array
Declare, instantiate, initialize and use multi-dimensional arrays

Working with Methods and Encapsulation
Create methods with arguments and return values; including overloaded methods
Apply the static keyword to methods and fields
Create and overload constructors; differentiate between default and user defined constructors
Apply access modifiers
Apply encapsulation principles to a class
Determine the effect upon object references and primitive values when they are passed into methods that change the values

Handling Exceptions
Differentiate among checked exceptions, unchecked exceptions, and Errors
Create a try-catch block and determine how exceptions alter normal program flow
Describe the advantages of Exception handling
Create and invoke a method that throws an exception
Recognize common exception classes (such as NullPointerException, ArithmeticException, ArrayIndexOutOfBoundsException, ClassCastException)

Las Temas en Espanol
Temas

QUESTION 1
Which three are advantages of the Java exception mechanism?

A. Improves the program structure because the error handling code is separated from the normal program function
B. Provides a set of standard exceptions that covers all the possible errors
C. Improves the program structure because the programmer can choose where to handle exceptions
D. Improves the program structure because exceptions must be handled in the method in which they occurred
E. Allows the creation of new exceptions that are tailored to the particular program being created

Answer: A,C,E

QUESTION 2
Given:
class Mid {
public int findMid(int n1, int n2) {
return (n1 + n2) / 2;
}
}
public class Calc extends Mid {
public static void main(String[] args) {
int n1 = 22, n2 = 2;
// insert code here
System.out.print(n3);
}
}
Which two code fragments, when inserted at // insert code here, enable the code to compile and print 12?
A. Calc c = new Calc(); int n3 = c.findMid(n1,n2);
B. int n3 = super.findMid(n1,n3);
C. Calc c = new Mid();
int n3 = c.findMid(n1, n2); D. Mid m1 = new Calc(); int n3 = m1.findMid(n1, n2);
E. int n3 = Calc.findMid(n1, n2);

Answer: A,D

Explanation:
Incorrect:
Not B: circular definition of n3.
Not C: Compilation error. line Calc c = new Mid(); required: Calc
found: Mid
Not E: Compilation error. line int n3 = Calc.findMid(n1, n2);
non-static method findMid(int,int) cannot be referenced from a static context

QUESTION 3
Given the for loop construct:
for ( expr1 ; expr2 ; expr3 ) { statement;
}
Which two statements are true?
A. This is not the only valid for loop construct; there exits another form of for loop constructor.
B. The expression expr1 is optional. it initializes the loop and is evaluated once, as the loop begin.
C. When expr2 evaluates to false, the loop terminates. It is evaluated only after each iteration through the loop.
D. The expression expr3 must be present. It is evaluated after each iteration through the loop.

Answer: B,C

Explanation:
The for statement have this forms: for (init-stmt; condition; next-stmt) { body
}
There are three clauses in the for statement.
The init-stmt statement is done before the loop is started, usually to initialize an iteration variable.
The condition expression is tested before each time the loop is done. The loop isn’t executed if the boolean
expression is false (the same as the while loop).
The next-stmt statement is done after the body is executed. It typically increments an iteration variable.

QUESTION 4
Which three statements are true about the structure of a Java class?

A. A class can have only one private constructor.
B. A method can have the same name as a field.
C. A class can have overloaded static methods.
D. A public class must have a main method.
E. The methods are mandatory components of a class.
F. The fields need not be initialized before use.

Answer: A,B,C

Explanation: A: Private constructors prevent a class from being explicitly instantiated by its callers.
If the programmer does not provide a constructor for a class, then the system will always provide a default,
public no-argument constructor. To disable this default constructor, simply add a private no-argument
constructor to the class. This private constructor may be empty.
B: The following works fine: int cake() {
int cake=0; return (1);
}
C: We can overload static method in Java. In terms of method overloading static method are just like normal
methods and in order to overload static method you need to provide
another static method with same name but different method signature.
Incorrect:
Not D: Only a public class in an application need to have a main method. Not E:
Example:
class A
{
public string something; public int a;
}
Q: What do you call classes without methods?
Most of the time: An anti pattern.
Why? Because it faciliates procedural programming with “Operator” classes and data structures. You separate
data and behaviour which isn’t exactly good OOP.
Often times: A DTO (Data Transfer Object)
Read only datastructures meant to exchange data, derived from a business/domain object.
Sometimes: Just data structure.
Well sometimes, you just gotta have those structures to hold data that is just plain and simple and has no
operations on it.
Not F: Fields need to be initialtized. If not the code will not compile. Example:
Uncompilable source code – variable x might not have been initialized

Click here to view complete Q&A of 1Z0-808 exam
Certkingdom Review
, Certkingdom PDF Torrents

MCTS Training, MCITP Trainnig

Best Oracle 1Z0-808 Certification, Oracle 1Z0-808 Training at certkingdom.com

Click to rate this post!
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published. Required fields are marked *