Winson Chow

Greenhorn
+ Follow
since Sep 29, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Winson Chow

public class Parent {
private void print(){
System.out.println(" From Parent");
}
public static void main(String args[]){
Parent p1 = new Parent();
p1.print();
p1 = new Chield();
p1.print();
}
}
class Chield extends Parent{
public void print(){
System.out.println(" From chield");
}
}
Output will be:
A. Compile error can't override the private method print()
B. From Parent
From chield
C. From Parent
From Parent
D. From chield
From chield
Given ans : C
I don't know why the ans is C instead of B.
What might cause the current thread to stop executing.

A. An InterruptedException is thrown.
B. The thread executes a wait() call.
C. The thread constructs a new Thread.
D. A thread of higher priority becomes ready.
E. The thread executes a waitforID() call on a MediaTracker.
Ans is A,B,D,E
Is A is correct?
Thanks
Winson
Which of the following statements are true regarding Inner classes or class
where they are declared and instantiated.
A. new SimpleInterface(){}
B. new ComplexInterface(){}
C. Myclass extends Object {}
D. new Myclass extends Object {}
E. abstrct class inner
F. private class C
G. new MyInterface(x) {}
My ans is A,B,C,E,F
Can anyone tell me the ans?
Thanks
Winson
Which of the following statements are true regarding Inner classes or class
where they are declared and instantiated.
A. new SimpleInterface(){}
B. new ComplexInterface(){}
C. Myclass extends Object {}
D. new Myclass extends Object {}
E. abstrct class inner
F. private class C
G. new MyInterface(x) {}
My ans is A,B,C,E,F
Can anyone tell me the ans?
Thanks
Winson
IS it true about GirdBagLayout?
You must specify to the component at end of the row as REMAINDER.
Thanks
Winson