Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Sachin Roham

+ Follow
since Aug 03, 2004
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 Sachin Roham

IF by Rudyard Kipling

If you can keep your head when all about you
Are losing theirs and blaming it on you,
If you can trust yourself when all men doubt you
But make allowance for their doubting too,
If you can wait and not be tired by waiting,
Or being lied about, don't deal in lies,
Or being hated, don't give way to hating,
And yet don't look too good, nor talk too wise:
If you can dream--and not make dreams your master,
If you can think--and not make thoughts your aim;
If you can meet with Triumph and Disaster
And treat those two impostors just the same;
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Or watch the things you gave your life to, broken,
And stoop and build 'em up with worn-out tools:

If you can make one heap of all your winnings
And risk it all on one turn of pitch-and-toss,
And lose, and start again at your beginnings
And never breath a word about your loss;
If you can force your heart and nerve and sinew
To serve your turn long after they are gone,
And so hold on when there is nothing in you
Except the Will which says to them: "Hold on!"

If you can talk with crowds and keep your virtue,
Or walk with kings--nor lose the common touch,
If neither foes nor loving friends can hurt you;
If all men count with you, but none too much,
If you can fill the unforgiving minute
With sixty seconds' worth of distance run,
Yours is the Earth and everything that's in it,
And--which is more--you'll be a Man, my son!
[ October 04, 2006: Message edited by: Sachin Roham ]
15 years ago
[ March 30, 2006: Message edited by: Sachin Roham ]
16 years ago
[ March 22, 2006: Message edited by: Sachin Roham ]
16 years ago
Hi guys,
If any of u guys can come up with some neat SCJP,SCWCD questions. Please mail me at
Remember they have to be orignal, we don't want to get involved in any copyright row.

[ October 08, 2004: Message edited by: Sachin Roham ]
[ October 08, 2004: Message edited by: Sachin Roham ]
hey fellow ranchers,
I have been working on a test simulator. It is developed in java, the tests are in xml format. Therefore new tests can be added anytime. Currently i have prepared a demo test with just 3 questions to give u the feel of the software. The questions are created by me and are not up to the SCJP standards.
This software can be used for any certification (SCJP,SCWCD etc).This software is free, and if it is good enough may be the ranch can keep it.As i have said it is still under development. Your feedback is very critical for further development.
Currently there is only one test, let's see if our guys (Marcus,Dan,Kathy) could donate some questions for us, it would be really great. Go ahead guys try it.

Waiting 4 ur feedback.

Check it out
[ September 24, 2004: Message edited by: Sachin Roham ]
I have given my SCJP1.4 on saturday 04th Sep.
How long does it take for my score to get onilne.
So far "Certificate Manager" application just shows me my status as passed.
Does the score ever get published on that database? If yes how long
does it take?

Thanks in advance.

[ September 08, 2004: Message edited by: Sachin Roham ]
I passed my SCJP1.4 with a score of 98%.Wow i feel so good.I would like to thank K&B for the Good Book. I give them a 10 on content and another 10 on the sense of humour. Yes and Dan for his exams. cause no matter how hard u try u never get a good score,(my best was 85%) but atleast they prepare u well for the final one. Which as most of u know is piece of cake as compared to his. Marcus Green's one is the closest to the actual thing. And last but not the least i would like to thank all may fellow ranchers. Man this place rocks!!! A big applause for the "Cowgirl".

And for my preparation...
I read the K&B book once. Made some flash cards, and used to read them
once in a while.
I did all of Dan's Mock exams, on some i scored 80% and on some 65%.
I got 95% on the Marcus Green Exam. But the key to a good score is
The real exam is easy, but u have to give each question some time, cause
there is always a catch (not the try{}catch one).
And last but not the least one chilled beer the evening before the real

Its party time guys...
The beer is on me.

[ September 07, 2004: Message edited by: Sachin Roham ]
17 years ago
Even i am plannin to give scjp next weekend.
If u have any mock tests remaining, keep them for
the last 2 or 3 days. I have kept 'Khalid Mughal' one.
If u have any keep em, so that u don't break the tempo.
Best of Luck.

Hey Grady,

If u check line 1...
return c1;
an implicit cast is put there 2 convert char to byte.
this is because c1 is a compile time constant...
(its value is known at complie time ie final char c1='\u001')

but in the case of line 2...
there is a problem cause c2 is not a compile time constant...
it is a definately a constant, but its value is not known at
compile time.. as it is an argument to a method its value can
change therefore the compiler complains at line 2.
hey Kitty,
Remember that whenever a string literal is encountered,
it is put in the pool, if it is already in the pool then that
object(the one in the pool) is reused as it is.

eg String s1="abc";// means check if a String "abc" is in the pool
// if it is reuse it, if not create a new
// String object with the value "abc"
// and put it in the pool

String s2 = new String("abc");// whenever u use the new operator
// a new object is created regardless
// if it exists in the pool

as Strings are immutable, all the string functions
(in the case of the ques) always return a new String.they use a new
operator internally.

String s3 = s1.substring(4,7);// the pool is never used here.

Moral of the story is, pool is used only in case of String literals.
I hope this makes things more clear.

double d = 0x45876; why this doesnt shows no compile time error

Why should it..
"0x45876" is an int literal(hexadecimal).
U can always assign a int to an double...
Hey Clyde,
Keep in mind each object instance has a single lock.
And there is a one class-wide lock for static synchronized methods.
When "t1" calls "methA()" t1 owns the object lock;
Now if t2 has to call "methB()" it must get the lock,
but as "t1" already owns it so "t2" has to wait for "t1" to release the lock...