jack zhu

Greenhorn
+ Follow
since Jul 10, 2001
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 jack zhu

why the output is 128.0 not 128 ? I remeber that: the variable that is invoked depends on the type of the Object and the method that is invoked depends on the Object itself. cos' the method of the superclass is not be overrideen?
class Sub extends Super {
public static void main(String [] args) {
Super sup = new Sub();
int i=128;
System.out.println(sup.test(i));
}
int test(int i) { return i; }
}
class Super {
double test(double d) { return d; }
}
Thank you, Anshul Manisha! I have learn more.Thanks again!
Thank you very much,Vanitha.
But I still have a question:
The statement x=x++ ,why x keep no change?
Hello,I have a question.That is:

In the real SCJP exam, the used computer operation system is Windows or Solar or the other?
Beause I am not familiar with Unix operation system.

Thanks!
I can't under in x=x++ x keep not changed?
and another question:
class Process {
byte b=127;
Process() {
this.methodA();
}

void methodA() {
System.out.println("Value of b is = " + b );
}

public static void main(String [] args) {
Processor p = new Processor();
}
}

class Processor extends Process {
byte b=126;

Processor() {
System.out.println("Value of b = " + b);
}

void methodA() {
System.out.println("Value of b = " + this.b);
}
}
What is the Output?
1.Prints Value of b = 0 and Value of b is = 126.
2.Compile-time error occurs.
3.Prints Value of b = 126 and Value of b = 126.
4.Prints Value of b = 127 and Value of b = 126.
why answer is 1--Prints Value of b = 0 and Value of b is = 126.