Chun Wang

Ranch Hand
+ Follow
since Jan 24, 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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Chun Wang

hello all.
I recently lost all my bookmarks on my pc. can anyone be kind enough to send me the link to the java 2 API document site? much appreciated.
thanks.
chun
Hello all.
I just passed the exam with 98% score, which I didn't expect. (but I will take it) I wanna make sure I thank all of you that help me. and the following few things are what I think some of you might wanna know.
1) book I used: Kahlid and Ramussen's "programmer's guide to java certification". since the exam is mostly about the fundamentals of java language. this books is very good at serving this purpose.and this is the ONLY certification book I used. but I have read some other books before (but not for certification purpose) like Core Java 2 I&II.
2) mock exams: I did about 15-16 mock exams recommended by Maha Anna. and this is a great place to test yourself. but I never score so high on the mocks. LEARN from your mock exams and don't repeat the same mistakes.
3) most helpful website: BigMoose Lounge of course! I don't know how to thank those that helped me enough. especially because I don't have the latest compiler. I used jdk 1.1. really OLD! and some of things I can't verify with my own program are all answered very clearly by the experts here.
4) my programming background. you REALLY need to write a lot of code in java to be able to pass. most of the questions are tricky if you haven't tried it yourself. I am a really good C programmer but don't know C++.
I wanna thank everyone here again and I will still be active in this lounge to help others if I can .just like you have done for me in the past couple weeks.
thanks.
chun
16 years ago
Hello all.
I just passed the exam with 98% score, which I didn't expect. (but I will take it) I wanna make sure I thank all of you that help me. and the following few things are what I think some of you might wanna know.
1) book I used: Kahlid and Ramussen's "programmer's guide to java certification". since the exam is mostly about the fundamentals of java language. this books is very good at serving this purpose.and this is the ONLY certification book I used. but I have read some other books before (but not for certification purpose) like Core Java 2 I&II.
2) mock exams: I did about 15-16 mock exams recommended by Maha Anna. and this is a great place to test yourself. but I never score so high on the mocks. LEARN from your mock exams and don't repeat the same mistakes.
3) most helpful website: BigMoose Lounge of course! I don't know how to thank those that helped me enough. especially because I don't have the latest compiler. I used jdk 1.1. really OLD! and some of things I can't verify with my own program are all answered very clearly by the experts here.
4) my programming background. you REALLY need to write a lot of code in java to be able to pass. most of the questions are tricky if you haven't tried it yourself. I am a really good C programmer but don't know C++.
I wanna thank everyone here again and I will still be active in this lounge to help others if I can .just like you have done for me in the past couple weeks.
thanks.
chun
I am using an OLD compiler and when I do the following:
System.out.println(String.valueOf(null));
//this gives me NullPointerException at runtime
but if I do this: Object o=null;
System.out.println(String.valueOf(o));
//this gives me "null" in the output.
and the API says if the argument is null ,it should return "null". what is the deal here?
please help!!! much appreciated.
chun
hello all.
I am not sure if BOTH preemptive AND time-slicing can be present on a particular machine. preemptive means if there is a runnable higher priority thread, the current thread will be bumped off while time-slicing means every thread gets its alloted time.
so my real question is: when a thread of higher priority is runnable, does it ALWAYS cause the current thread to yield? even if the machine has a time-slicing mechanism?
please advise! much apprecaited.
chun
Hi.
consider the following code: (this compiles and runs fine)
-------------------------
class Sup {
protected int c =99;
}
class Sub extends Sup {
public static void main(String[] args) {
Sup s = new Sup();
System.out.println("protected c = "+s.c);
}
}
-----------------------
it prints out "protected c = 99".
so this means if you are in the same package, you can even access the protected members of the super class object.
correct me if I am wrong. thanks for your help.
chun
Hello all.
are all the user-defined class considered to be in the same PACKAGE as the Object class? my guess is yes. because you can access the protected finalize() method via a SUPERclass object reference "super". this following code compiles fine. so that means if you are in the same package as the protected member,you can access it even if it's in a superclass object. only when you are outside of that package can you NOT access the protected member of a superclass object.

please confirm my understanding. thanks for all the help.
chun
------------
protected void finalize() throws Throwable {
System.out.println("okay");
super.finalize();
}
---------------------
I am using an old compiler (jdk1.1) and I wanna make sure my understanding is correct. I think you can declare a method abstract (although not necessary) in an interface . but some book says "methods in interface should NOT be declared abstract as they are implicitly abstract". so my question is : can you use the abstract modifier for interface method?
please help. thanks a lot!
chun
I am using an OLD compiler. jdk 1.1. so I guess it is the compiler that gives me the misconception. thanks for all your help.
chun
thre is a question in Jargon that says "an abstract method cannot be private." and the answer is true. but I tried it out like this in an abstract class, it compiles.
private abstract void dd();
is the exam wrong? am I correct?
thanks for clearing my doubts. much appreciated.
chun
Hello guys.
I wonder if someone can be kind enough to tell me where I can read the privacy statements (the first 2 questions on the real exam) before the exam. are these two questions the first two on the exam? should I just say I agree without reading them?
please advice! thanks a lot!
chun
thanks guys!
this is really helpful!
chun
I found this question on Jargon.
=========================================
11) A label for the break statement
a) must be before a for, do or while loop (other than white space(s) and comments)
b) must be before an if, else, for, do or while statements (other than white space(s) and comments)
c) should not be before another label
d) must be before a for,do,while loop or a block inside a loop (other than white space(s) and comments)
e) None of the above
Select the most appropriate answer
==========
the answer given is D. but I don't think it's right to say "must be" because you can put a label in front of any block of code and put break label inside that block of code. you can do:
label1: {int www, uuu; break label1;}
it will compile.
am I correct or am I missing something? please help!
thanks a lot!
chun
I read the article Marcus Green put on the web and it says that
the >> and << can never cause a number to change it sign. I agree that >> will never change a number's sign. but I think << CAN change a number's sign.
for example, try this in main():
int n = 11;
n<<=28;
System.out.println("n = "+n);
you will see that the output n is a large NEGATIVE number. that means it went from positive to negative. this happened when a '1' is shifted to the left most position. and when that happened, the number became too large to fit the int range and it "wraps around" to be a large negative number.
can anyone clear my doubts on this? am I understanding this correctly?
thanks a lot.
chun
Hello Jenny.
I assure you there is nothing wrong with creating non-static inner class objects in main(). you can try by getting rid of all the lines that have the variable aaa .then it will compile fine.
chun