Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!


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

Recent posts by charu

arrB is a subclass of arrA,so why shold it not throw a ClassCastException in line 2 itself.
What is the difference betwen lines 2 and 3.
please clear this difference.


Originally posted by niraj singh:
Hi charu,
You have not defined the type of variable arr in line 3. I expect you meant it to be arrB. In that case, line 3 will give a ClassCastException. That is because you are assigning a superclass array object to a subclass field.
For example, if A is the superclass and B is the subclass, you can write
A a = new B();
but you can't write, B b = new A();

yes we do get long codes especialy for "thread" .

Originally posted by kaffo lekan:
please i like to know do we get Question with long codes in the exam(SCJP 2).

public class X {
public static void main(String args[] ) {
A[] arrA;
B[] arrB;
arrA =new A[10];
arrB = new B[20];
arrA=arrB; //1
arrB=(B[])arrA; //2
arrA= new A[10];
arrB =(B[]) arrA; //3
class A{}
class B extends A {}
the options are:
1.the program will throw a java.lang.ClassCastException at line labeled 2 when run
2.the program will throw a java.lang.ClassCastException at line labeled 3 when run.

[This message has been edited by charu (edited March 08, 2001).]
Hi kamal,
read from khalid mughal chapter 2 pg 23,24.

Originally posted by kamal jaisingh:
this is regarding binary values .
how r they determined?
now the binary value of 6 is supposed to be 0110
the binary value of 3 is 0011
how r they determined ??
i do not understand how a binary value is defined for a particular number.
pls help.
thx a lot .

Hi Susmita,
I am from sydney and planning to sit in march.It would be wonderful if you get in touch and discuss about the test.
Actually i did post a message on 9 feb about the same subject.

Originally posted by sri devij:
hi friends!
can u pl. tell me r there any certification programs in Java other than scjp and brainbench both free and commercial
Thanks in advance

yes there are heaps of them at

Originally posted by natarajan meghanathan:
Hi friends,
I passed the exam today scoring 88%. I got pulled down in my weakest area of threads. got only 57% in that. lot of thread-based questions were there.
Any way, i learnt a lot of concepts in the java language and wish to come to this site and share and gain knowledge.


Hi Natarajan,
Congratulations on your success you got a real good score.
You have not mentioned about the duration of your preparation your status and the books that you referred to.It would be of help to us if you could tell us .
Keep up the good work Natarajan.
21 years ago
hi friends,
pls let me know if you are in Sydney and appearing for the exam in march.

<bold>Congratulations.</bold>This is really a great score.You Should be called "Guru in Java".
Could you please send me the links of the text files that you have edited my email is

Originally posted by ye zhang:
Yes, I did have Java programming experience before. Say, I started learning Java in 1998. However, Java is not my primary language for my job, C/C++ is. I write Java programs for personal interest. I haven't written any Java program developed to Production servers.
RHE will not cover everything, but I think its topic is enough to cover the exam objectives. What really helped me a lot is the mock exams.
I read RHE book carefully once, then I took as many mock exams as I can. There are about 40 exam links from Maha's homepage, I took about 35+.
My tip to take the mock exams is to mark the ones I didn't make, then try to fully understand the correct answers. The best thing to do is to RUN THE CODE ON YOUR COMPUTER. The Java compiler will give you a lot of information.
I have copied, pasted and run the code from more than 200 mock
exam questions, this process helped me a lot!!!
There are several very good materials I think:
1. ( Covers important concepts like: Private or static methods are statically bound; No arithmetic promotion for ++,--,+=,etc; ...)
(Remember to take the test on Tidbit 7)
(You should get the answer explanation from the author, and try to understand them. This test is tougher than real test, but it definitely teaches a lot of JLS concepts.)
4. Mock exam 24th on Maha's page. There are several error answers, but good questions and explanations. Try to run some of the codes by yourself.
5. Marcus Green's exams. ( I did them twice, the second time (done 3 days before real test)I finished >95% for each of them, but I forgot what were the first time scores.)
I have also edited several text files myself which covers concepts or mock exam questions that I thought need second thoughts, if any of you are interested in getting them, please give me your email address, and I can send them to you. I would be happy to be able to help you guys a little bit.

21 years ago

Dear Chetan,
Congrats on your success.
21 years ago

I also think its C because an object is eligible for garbage collection when it refers to null.
Hi Mukesh,
Congratulations on your high score.Keep up the good work.
What error will it give if there is no catch for a try but there is a finally?

[This message has been edited by charu (edited October 17, 2000).]
[This message has been edited by charu (edited October 17, 2000).]
21 years ago
hi Shekhar,
please send me SaiRam's "most frequently asked questions" at as soon as possible.I will be sitting next month.
Thank you.

Originally posted by S. P.Shekhar:
Please don't consider this mail as any attempt to ask

Hi Anonymous,
A very hearty congragulations on your success.
Could you please give me some tips i will be appearing for the exam in a months time.I am reading from RHE and Bill Brogdens exam cram.
Once again Congratulations to you.
thank you,

Originally posted by Anonymous:
Hi Javaranchers,
I am one of those silent fans of Javaranch. I passed my SCJP2 today and was shocked to see my score that I had to rubs my eyes and pinch myself to check if I was awake. I scored a perfect 100.
I have to thank Maha anna as I did follow her preparation tips and gave a lot of mock exams. I used to score around 93% in most of the mock exams. My exam I felt was simpler than most of the mocks. Also I did not get the dreaded Socket or MediaTracker qstns. However I did get plenty of questions on Polymorphism, Threading and Java concepts.
I took about 1.5 months to prepare for this exam. The first one month I spend reading Thinking in Java 2, the last 15 days, I breezed thru Khalid Mughals certificatin book, took plenty of mocks and spend a lot of time going thru the Java Ranch Threads.
Thank you Java ranch. You really are a fab site.
For all the Java gurus any idea on the way forward now. I am not a newbie into computing but yes defy a newbie into Java. I have about 7 years of IT expr in a variety of topics like C, Oracle etc.
All the very best to those aspiring for SCJP2. Just one advice relax and think clearly. Take your time. 120 mins is a lot of time for 59 questions. I managed to finish the test and revise the answers twice in about 61 minutes.
Guess I will just chill out today and let the feeling sink in.