Peter Java

Greenhorn
+ Follow
since Oct 03, 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 Peter Java


Hi everyone,
Before I rename myself I would like to say thank you for your whishes.
Java 2 Exam Cram is the only book I used, bcos I only need to learn the difference between Java and C. Java 2 Exam Cram packed with all the necessary information without redundancy.
After some research, I decided to go with SCWCD. The others from sun do not make sense to me.
Talk to you in my new name.
18 years ago
Hi all,
I passed SCJP2 with 93% yesterday. It was easier than I thought.
Mock-tests taken:
Abhilash's site
Applied Reasoning
Barry Boone exam
Mughal Khalid's exam applet
Guoqiao Sun1, 2, 3
Javacaps1, 2
Jammi's applet
Naveen's SCJP site(javaprepare)
Jtips exam 1, 2
Marcus green - Exam1, 2, 3
MindQ
Sahir's Mock exam
after gotten above 70% consistently on the mock exams above:
JQPlus (the best)
Books used:
Java 2 Exam Cram
Others:
Javaranch(http://www.javaranch.com)
Maha anna's discussion archives(http://www.javaranch.com/maha/index.html)
Velmurugan Periasamy's Notes
18 years ago

Is this the one you are looking for?
class Super {
public void method(int i)
{
System.out.println("Method From Super: " + i);
}
}
class aaa extends Super
{
public static void main(String[] args)
{
new aaa().method(3);
new aaa().method(3L);
}
public void method(long i)
{
System.out.println("Method From aaa: " + i);
}
}

s2, the reference of new StringBuffer("s2"), remains the same.
That is, s2 is still a reference to new StringBuffer("s2").
But the object was changed by b2.append(" ");.
Here is the order of initialization:
1)Super class's static blocks and static variable declaration & initialization(as per their order).
2)Sub class's static blocks and static variable declaration & initialization(as per their order).
3)Super class's non-static blocks and non-static variable declaration & initialization(as per their order).
4)Super class's constructor.
5)Sub class's non-static blocks and non-static variable declaration & initialization(as per their order).
6)Sub class's constructor.
The original code will not compile. The following will:
class A
{
public A()
{
System.out.println("AAA");
}
{System.out.println("456");}
}
public class B extends A
{
B()
{
this(12);
System.out.println("BBB");
}
B(int x)
{
System.out.println("CCC");
}
{System.out.println("123");}
public static void main(String[] args)
{
new B();
}
}

[This message has been edited by Peter Java (edited September 11, 2001).]

This is because the arguments of Java method calls are passed by
value. Here, the value of s1 ie. the reference to the object of new StringBuffer("s1") not the object, is passed to the method.
In the method b1, the reference, is changed not s1.
That is, s1 remains the same.
Hi Guoqiao,
Thanks for your replay.
When I go to http://jquest.webjump.com/ the following site shows up: http://www.megago.com/l/.
My question is where I can find Jquest in http://www.megago.com/l/ ?
Thanks
Hi,
Can anybody tell me where I can get Jquest?
Thanks
Hi,
Can anybody tell me where the latest link to Jquest is?
The old link http://jquest.webjump.com/ points to http://www.megago.com/l/.
Thanks