[Free] 2018(Jan) EnsurePass Testinsides Oracle 1z0-803 Dumps with VCE and PDF 1-10

By | January 25, 2018

Ensurepass.com : Ensure you pass the IT Exams
2018 Jan Oracle Official New Released 1z0-803
100% Free Download! 100% Pass Guaranteed!

Java SE 7 Programmer I

Question No: 1


Ensurepass 2018 PDF and VCE

What is the result?

  1. 1 1


  2. 1 2


  3. 2 3


  4. Compilation fails

  5. The loop executes infinite times

Answer: E

Question No: 2

The catch clause argument is always of type .

  1. Exception

  2. Exception but NOT including RuntimeException

  3. Throwable

  4. RuntimeException

  5. CheckedException

  6. Error

Answer: C Explanation:

Because all exceptions in Java are the sub-class ofjava.lang.Exceptionclass, you can have a singlecatch blockthat catches an exception of typeExceptiononly. Hence the compiler is fooled into thinking that this block canhandle any exception.

See the following example:



// …


catch(Exception ex)


// Exception handling code for ANY exception


You can also use the java.lang.Throwable class here, since Throwable is the parent class for the application-specificException classes. However, this is discouraged in Java programming circles. This is because Throwable happens to also be the parent class for the non-application specific Error classes which are not meant to be handled explicitly as they are catered forby the JVM itself.

Note: The Throwable class is the superclass of all errors and exceptions in the Java language. Only objects that are instances of this class (or one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java throw statement.

A throwable contains a snapshot of the execution stack of its thread at the time it was created. It can also contain a message string that gives more information about the error.

Question No: 3

Which two items can legally be contained within a java class declaration?

  1. An import statement

  2. A field declaration

  3. A package declaration

  4. A method declaration

Answer: B,D

Reference: http://docs.oracle.com/javase/tutorial/java/javaOO/methods.html

Question No: 4

Given the code fragment:

Ensurepass 2018 PDF and VCE

Which code fragment prints blue, cyan, ?

Ensurepass 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Answer: A

Question No: 5


public class DoBreak1 {

public static void main(String[] args) { String[] table = {quot;aaquot;, quot;bbquot;, quot;ccquot;, quot;ddquot;}; for (String ss: table) {

if ( quot;bbquot;.equals(ss)){ continue;


System.out.println(ss); if ( quot;ccquot;.equals(ss)) { break;





What is the result?

  1. aa cc

  2. aa bb


  3. cc dd

  4. cc

  5. Compilation fails.

Answer: A

Question No: 6


public class Painting { private String type;

public String getType() { return type;


public void setType(String type) { this.type = type;


public static void main(String[] args) { Painting obj1 = new Painting(); Painting obj2 = new Painting(); obj1.setType(null); obj2.setType(quot;Frescoquot;);

System.out.print(obj1.getType() quot; : quot; obj2.getType());



What is the result?

  1. : Fresco

  2. null : Fresco

  3. Fresco : Fresco

  4. A NullPointerException is thrown at runtime

Answer: B

Question No: 7


Ensurepass 2018 PDF and VCE

What is true about the class Wow?

  1. It compiles without error.

  2. It does not compile because an abstract class cannot have private methods.

  3. It does not compile because an abstract class cannot have instance variables.

  4. It does not compile because an abstract class must have at least one abstract method.

  5. It does not compile because an abstract class must have a constructor with no arguments.

Answer: A

Question No: 8


public class Equal {

public static void main(String[] args) { String str1 = quot;Javaquot;;

String[] str2 = {quot;Jquot;,quot;aquot;,quot;vquot;,quot;aquot;}; String str3 = quot;quot;;

for (String str : str2) { str3 = str3 str;


boolean b1 = (str1 == str3); boolean b2 = (str1.equals(str3)); System.out.print(b1 quot;, quot; b2);


What is the result?

  1. true, false

  2. false, true

  3. true, true

  4. false, false

Answer: B

Explanation: == strict equality. equals compare state, not identity.

Question No: 9

Given a java source file:

Ensurepass 2018 PDF and VCE

What changes will make this code compile? (Select Two)

  1. Adding the public modifier to the declaration of class x

  2. Adding the protected modifier to the x() constructor

  3. Changing the private modifier on the declaration of the one() method to protected

  4. Removing the Y () constructor

  5. Removing the private modifier from the two () method

Answer: C,E Explanation:

Using the private protected, instead of the private modifier, for the declaration of the one() method, would enable the two() method to access the one() method.

Question No: 10

Given the code fragment:

float x = 22.00f % 3.00f; int y = 22 % 3;

System.out.print(x quot;, quot; y); What is the result?

A. 1.0, 1

B. 1.0f, 1

C. 7.33, 7

  1. Compilation fails

  2. An exception is thrown at runtime

Answer: A

100% Ensurepass Free Download!
Download Free Demo:1z0-803 Demo PDF
100% Ensurepass Free Guaranteed!
1z0-803 Dumps

EnsurePass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.