Oracle Java Certified Programmer - 1Z0-501 FREE EXAM DUMPS QUESTIONS & ANSWERS
Exhibit:
1 . class super {
2 .public int getLength(){return 4;}
3 .}
4 .
5 . public class Sub extends Super {
6 .public long getLength() {return 5;}
7 .
8 . public static void main (String[]args){
9 .super sooper = new Super ();
1 0. Sub sub = new Sub();
1 1. System.out.printIn(
1 2.sooper.getLength()+ "," + sub.getLength()};
1 3.}
1 4. }
What is the output?
1 . class super {
2 .public int getLength(){return 4;}
3 .}
4 .
5 . public class Sub extends Super {
6 .public long getLength() {return 5;}
7 .
8 . public static void main (String[]args){
9 .super sooper = new Super ();
1 0. Sub sub = new Sub();
1 1. System.out.printIn(
1 2.sooper.getLength()+ "," + sub.getLength()};
1 3.}
1 4. }
What is the output?
Correct Answer: B
Vote an answer
Given:
1 . package foo;
2 .
3 . public class Outer (
4 .public static class Inner (
5 .)
6 . )
Which statement is true?
1 . package foo;
2 .
3 . public class Outer (
4 .public static class Inner (
5 .)
6 . )
Which statement is true?
Correct Answer: A
Vote an answer
Which method in the Thread class is used to create and launch a new thread of execution?
Correct Answer: A
Vote an answer
Given:
1 . abstract class abstrctIt {
2 . abstract float getFloat ();
3 . )
4 . public class AbstractTest extends AbstractIt {
5 . private float f1= 1.0f;
6 . private float getFloat () {return f1;}
7 . }
What is the result?
1 . abstract class abstrctIt {
2 . abstract float getFloat ();
3 . )
4 . public class AbstractTest extends AbstractIt {
5 . private float f1= 1.0f;
6 . private float getFloat () {return f1;}
7 . }
What is the result?
Correct Answer: A
Vote an answer
Given:
1 . public class Foo {
2 . private int val;
3 . public foo(int v) (val = v;)}
4 . public static void main (String [] args){
5 . Foo a = new Foo (10);
6 . Foo b = new Foo (10);
7 . Foo c = a;
8 . int d = 10;
9 . double e = 10.0;
1 0. }
1 1. }
Which three logical expression evaluate to true? (Choose Three)
1 . public class Foo {
2 . private int val;
3 . public foo(int v) (val = v;)}
4 . public static void main (String [] args){
5 . Foo a = new Foo (10);
6 . Foo b = new Foo (10);
7 . Foo c = a;
8 . int d = 10;
9 . double e = 10.0;
1 0. }
1 1. }
Which three logical expression evaluate to true? (Choose Three)
Correct Answer: C,E,F
Vote an answer