Question 1. |
We have the following organization of classes.
class Parent { } class DerivedOne extends Parent { } class DerivedTwo extends Parent { } |
Which of the following statements is correct for the following expression.
Parent p = new Parent(); DerivedOne d1 = new DerivedOne(); DerivedTwo d2 = new DerivedTwo(); p = d1; |
Question 2. |
We have the following organization of classes.
class Parent { } class DerivedOne extends Parent { } class DerivedTwo extends Parent { } |
Which of the following statements is correct for the following expression.
Parent p = new Parent(); DerivedOne d1 = new DerivedOne(); DerivedTwo d2 = new DerivedTwo(); d1 = d2; |
Question 3. |
We have the following organization of classes.
class Parent { } class DerivedOne extends Parent { } class DerivedTwo extends Parent { } |
Which of the following statements is correct for the following expression.
Parent p = new Parent(); DerivedOne d1 = new DerivedOne(); DerivedTwo d2 = new DerivedTwo(); d1 = (DerivedOne)d2; |
Question 4. |
We have the following organization of classes.
class Parent { } class DerivedOne extends Parent { } class DerivedTwo extends Parent { } |
Which of the following statements is correct for the following expression.
Parent p = new Parent(); DerivedOne d1 = new DerivedOne(); DerivedTwo d2 = new DerivedTwo(); d1 = (DerivedOne)p; |
Question 5. |
We have the following organization of classes.
class Parent { } class DerivedOne extends Parent { } class DerivedTwo extends Parent { } |
Which of the following statements is correct for the following expression.
Parent p = new Parent(); DerivedOne d1 = new DerivedOne(); DerivedTwo d2 = new DerivedTwo(); p = (Parent)d1; |
Question 6. |
With which I/O operation can we append. update a file?
Question 7. |
For which of the following code will produce ‘test” as output on the screen?
int x=10.0; if ( x==10.0) { System.out.println(“test”); } |
int x=012; if ( x==10.0) { System.out.println(“test”); } |
int x=10f; if ( x==10.0) { System.out.println(“test”); } |
int x=10L; if ( x==10.0) { System.out.println(“test”); } |
Question 8. |
Given this class?
class Loop { |
The question is which code must replace the <<
continue middle; |
break outer; |
break middle; |
continue outer; |
none of these... |
Question 9. |
Which component cannot be added to a container?
Question 10. |
What does it mean when the handleEvent() returns the true boolean?
![]() |
DISCLAIMER
|
![]() |
|
More is added to the list, but what I realy need is your help to keep this information up-to-date and may be it needs correcting in one way or the other. Please feel free to help me complement these question and answers drop us an email at this address. (C) 1998-2001, BMC88 - Personal WebSite of Java Certification Exams |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
![]() |
|
![]() |
![]() |