brijesh r

Greenhorn
+ Follow
since Oct 03, 2000
Merit badge: grant badges
For More
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 brijesh r

representing it graphically makes things clearer,
let me try explaining it like this.
Initial state
s1---->[seventh]
s2----[seventh]
for the method a copy of the references are sent
so we have
s1---->[seventh]<-----b1
s2----[seventh]<-----b2
string buffer is mutable so the append adds to the same object,
so after the method call this is the status
s1---->[seventh]
s2----[seventh cloud]<-----b2, b1
and now what we are printing are s1 and s2 which is ofcourse seventh and seventh cloud
hope this is clear
regards
brijesh
i found this in one of the mocks and got a revised version in my JCP, i will frame it my way:
StringBuffer s1 = new StringBuffer("seventh");
StringBuffer s2 = new StringBuffer("seventh");
method(s1,s2);
System.out.println("s1 is" + s1 + " s2 is " + s2);
void method(StringBuffer b1, StringBuffer b2)
{
b2.append(" cloud");
b1 = b2;
}
Guess what is the output??
the answer is s1 is seventh
and s2 is seventh cloud

rohit,
really sorry to hear that.
i took up the exam just today morning i.e 3rd october at 10am est. hope it dint have anything to do with the time difference in the US.
i got the same old pattern 59 questions, 120 minutes, i could complete in 60 minutes though.
iam sure sun will re-imburse you.
and all the best. dont loose hope.
thanks a lot to u all guys at javaranch.
I just referred to Simon roberts et all book. and went thro most of the mock links suggested by javaranch and ofcourse the rules round up.
I had done a course in java, but for the certification i prepared for 15 days, discussing with friends helped a lot.
i think the mock exams were far too difficult compared to the real one, but dont relax.
i had a question on socket and one on media tracker.
Jxam and JQuest applet available for download were real cool tools to both test ur preperation and also to learn.
this link has all possible mock exam links. http://www.javaranch.com/maha/_Mock_Exams/_mock_exams.html
best of luck to all guys preparing for JCP.
cheers
brijesh