Start Exam: Oracle Certified Professional Java Programmer

Questions (5 to 100):
Start FlashCards Download PDF

OCJP Oracle Certified Professional, Java SE 6 Programmer mock exams, MCQ Multiple Choices Questions Quiz Test Bank

Formally Know as: SCJP Sun Certified Java Programmer Exams

Java Programming Language

Disclaimer  Oracle, Sun, Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Exam PDF eBook: 
Oracle Certified Professional Java Programmer
Download SCJP/OCJP Mock Exam PDF eBook
297 Pages
2010
English US
Educational Materials
Sample Questions from the Oracle Certified Professional Java Programmer Exam

Question: What is the result of compiling and running the following code?

Choices:

"AB" will be printed

"A" will be printed followed be a NullPointerException thrown

"B" will be printed

No output is produced

Question: What is the result of compiling and running the following program?

Choices:

Compilation error

falsefalsetruetrue

truetruetruetrue

truefalsetruetrue

Question: What is the expected output?

Choices:

true

false

Question: Select the common methods, which are defined for both type String and type StringBuffer ?

Choices:

toString()

length()

append(String)

trim()

equals(Object)

Question: Which of the statements will evaluate to true?

Choices:

stmt1

stmt2

stmt3

stmt4

Question: Which of the statements would evaluate to true?

Choices:

stmt1

stmt2

stmt3

stmt4

stmt5

Question: What is the expected output?

Choices:

RuntimeException is thrown because of the first print statement

RuntimeException is thrown because of the second print statement

nullnullnullnull

nullnull

compilation error

Question: What is the expected output?

Choices:

true

false

Question: What is the result of compiling and running the following code?

Choices:

true

false

Question: Which of the following methods can be invoked by an object of Pattern class?

Choices:

compile

matches

group

toString

Question: What is the result of compiling and running the following code?

Choices:

JavaChamp is here to help you

JavaChamp i here to help you

No output is produced

Compilation error

Questions (5 to 100):
Start FlashCards Download PDF