Oracle 1Z0-803 Certification Sample Questions and Answers

1Z0-803 PDF, 1Z0-803 Dumps PDF Free Download, 1Z0-803 Dumps Free, 1Z0-803 Latest Dumps PDF, 1Z0-803 PDF Free DownloadThe Oracle 1Z0-803 Sample Question Set is designed to help you prepare for the Java SE 7 Programmer I (1Z0-803) certification exam. To become familiar with actual Oracle Certification exam environment, we suggest you to try Sample Oracle 1Z0-803 Certification Practice Exam.

This sample Oracle 1Z0-803 certification practice exam is designed for evaluation purposes only. If you really want to test your knowledge to identify your weak areas and familiarize with actual exam format, we suggest you to practice with Premium Oracle 1Z0-803 Certification Practice Exam for Java SE 7 Programmer I (1Z0-803) certification. Our team of Java experts have designed Questions-Answers for this premium practice exam by collecting inputs from recently certified candidates. Hence, We strongly recommend you to use Premium Oracle 1Z0-803 Certification Practice Exam to clear your actual Oracle 1Z0-803 Certification Exam with great score.

1Z0-803 Sample Questions:

01. Given:
public class MyLoop {
 public static void main(String[] args) {
 String[] sa = {"tom ", "jerry "};
 for (int x = 0; x < 3; x++) {
 for (String s : sa) {
 System.out.print(x + " " + s);
 if (x == 1) {
 break;
 }
 }
 }
 }
}
What is the result?
a) 0 tom 0 jerry 1 tom 1 jerry
b) 0 tom 0 jerry 2 tom 2 jerry
c) 0 tom 0 jerry 1 tom 2 tom 2 jerry
d) 0 tom 0 jerry 1 tom 1 jerry 2 tom 2 jerry
 
02. Given:
public class Calculator {
 int num = 100;
 public void calc(int num) {
 this.num = num * 10;
 }
 public void printNum(){
 System.out.println(num);
 }
 public static void main(String[] args) {
 Calculator obj = new Calculator ();
 obj.calc(2);
 obj.printNum();
 }
}
What is the result?
a) 20
b) 100
c) 1000
d) 2
 
03. Given:
class Feline {
 public String type = "f ";
 public Feline() {
 System.out.print("feline ");
 }
}
public class Cougar extends Feline {
 public Cougar() {
 System.out.print("cougar ");
 }
 void go() {
 type = "c ";
 System.out.print(this.type + super.type);
 }
 public static void main(String[] args) {
 new Cougar().go();
 }
}
What is the result?
a) cougar c f
b) feline cougar c c
c) feline cougar c f
d) Compilation fails.
 
04. Given:
interface Rideable { String getGait(); }
public class Camel implements Rideable {
 int weight = 2;
 String getGait() { return " mph, lope"; }
 void go(int speed) {
 ++speed; weight++;
 int walkrate = speed * weight;
 System.out.print(walkrate + getGait());
 }
 public static void main(String[] args) {
 new Camel().go(8);
 }
}
What is the result?
a) 16 mph, lope
b) 24 mph, lope
c) 27 mph, lope
d) Compilation fails.
 
05. Which of the following statements is incorrect about the main method used to start a Java application?
a) A class can’t define multiple main methods.
b) More than one class in an application can define the main method.
c) The main method may accept a String, a String array, or varargs (String... arg) as a method argument.
d) The main method shouldn’t define an object of the class in which the main method itself is defined.
 
06. Given:
public class MyStuff {
 String name;
 MyStuff(String n) {
 name = n;
 }
 public static void main(String[] args) {
 MyStuff m1 = new MyStuff("guitar");
 MyStuff m2 = new MyStuff("tv");
 System.out.println(m2.equals(m1));
 }
 public boolean equals(Object o) {
 MyStuff m = (MyStuff) o;
 if (m.name != null) {
 return true;
 }
 return false;
 }
}
What is the result?
a) The output is true and MyStuff fulfills the Object.equals() contract.
b) The output is false and MyStuff fulfills the Object.equals() contract.
c) The output is true and MyStuff does NOT fulfill the Object.equals() contract.
d) The output is false and MyStuff does NOT fulfill the Object.equals() contract.
 
07. Given:
class Alpha {
 String getType() {
 return "alpha";
 }
}
class Beta extends Alpha {
 String getType() {
 return "beta";
 }
}
public class Gamma extends Beta {
 String getType() {
 return "gamma";
 }
 public static void main(String[] args) {
 Gamma g1 = new Alpha();
 Gamma g2 = new Beta();
 System.out.println(g1.getType() + " "
 + g2.getType());
 }
}
What is the result?
a) alpha beta
b) beta beta
c) gamma gamma
d) Compilation fails.
 
08. Which two are benefits when appropriately using polymorphism?
(Choose two.)
a) code that is protected from extension by other classes
b) code that is more dynamic at runtime.
c) code that is faster at runtime.
d) code that is more flexible and reusable
e) code that is more efficient at runtime
 
09. Given:
import java.util.*;
public class App {
 public static void main(String[] args) {
 List p = new ArrayList();
 p.add(7);
 p.add(1);
 p.add(5);
 p.add(1);
 p.remove(1);
 System.out.println(p);
 }
}
What is the result?
a) [7, 1, 5, 1]
b) [7, 5, 1]
c) [7, 5]
d) [7, 1]
 
10. In the code segment, what is the method getMoney() considered?
a) Get method
b) Access method
c) Getter method
d) Instance variable method

Solutions:

QUESTION: 01

Answer: c

QUESTION: 02

Answer: a

QUESTION: 03

Answer: b 

QUESTION: 04

Answer: d

QUESTION: 05

Answer: c, d

QUESTION: 06

Answer: c

QUESTION: 07

Answer: d

QUESTION: 08

Answer: b, d

QUESTION: 09

Answer: b

QUESTION: 10

Answer: c

Rating: 4.8 / 5 (34 votes)