Win a copy of Rust Web Development this week in the Other Languages forum!

rajashree ghatak

Ranch Hand
+ Follow
since Mar 10, 2001
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 rajashree ghatak

Both 2 and 3 options are correct.
In real Exam, Questions (with choose the best answer) will not be asked.The Questions in real JCP are in very clear language and there is no ambiguity.
option b is not true.
"sychronized" keyword is used to prevent all the threads from accessing a shared resource at the same time.only one thread can acquire the lock on the object at any point of time and other threads have to wait to enter the monitor.Synchronized method or block ensures this.
[This message has been edited by rajashree ghatak (edited November 04, 2001).]
System.out.println( new SubClass() );
in the above statement,new SubClass()statement is creating an object of the class SubClass.when an object is passed in print or println staements as an argument,toString() method of that class is called implicitly.
Here System.out.println( new SubClass() );
is equivalent to System.out.println( new SubClass().toString() );
which calls the toString() of SubClass which in turn calls toString() method of Super through super.toString() call.
The output is "43"
option 3 is correct.A try statement must have either a catch or a finally clause associated with it always.It can have both together also.Nothing is wrong in that.
hi rashmi,
An overriding method can either throw only a subset of the exceptions thrown by the overridden method or all the exceptions thrown by the overridden method or a new exception which is a subclass of the exception thrown by the overridden method.The overriding method doesn't need to throw any exceptions at all since a subset of 0 elements is a valid subset.
However, an overriding method cannot throw an exception which is the superclass of the exception thrown by overridden method.
Hence the statement is false.
Also only checked exceptions(not RuntimeException and its subclasses)need to be mentioned in the throws clause of the method if not handled by the method itself.

[This message has been edited by rajashree ghatak (edited November 04, 2001).]
Hello Chandra,
Try to practice as many code snippets on the machine as possible.They surely make ur concepts clear and strong which is necessary since the Exam tests ur fundamentals.
Regarding Mock Exams for JCP, there r large number available on NET.Don't try to do all but a select few since not all are good.U can also buy a JQ+ or JWhiz simulators, which are very useful from JCP point of view.Both of them have a very good and large amount of Questions to give u practice.
A few days prior to the Exam, u should give the 3 or at least 2 of Marcus Green mock tests which too r very good.
Sun Certified Java Programmer,Platform-2
20 years ago
Thanx Manish,Valentin,FEI NG,Priyha,Dave,Suma,Ersin,Ashik
for congratulatory messages and ur best wishes.Ur Good Wishes mean a lot to me.
Ashik,i haven't yet thought what to do next.most probably start hunting for a job.
20 years ago
hi all,
yesterday afternoon went for the exam and came out of the Testing Center with a score of 88%(52 out of 59 Qs correct).i feel proud and very excited to post my result in this forum as i had always wished to see my post here.

Section Analysis of my test result:
Declarations and Access Control....................87%
Flow control and exception handling................71%
Garbage Collection.................................100%
Language Fundamentals..............................100%
Operators and Assignments...........................71%
Overloadin,Overriding,Runtime Type & OO............100%
java.awt package...................................100%
java.lang package..................................100%
java.util package..................................100% package....................................100%
i would like to take this opportunity to tell how wonderful this site of Javaranch has always got something or the other to offer to all wanting to learn Java.
my favourite forums on this site have been Programmer Certification Study and Certification Results.Almost every alternate days i used to visit them during my preparations for JCP.the posts of SCJPs in Certication Results forum have been very motivating and inspiring.
Also visiting Prog. Certification forum helped me in clearing my doubts and concepts and i found the discussions very useful.i would like to recommend to all the aspiring SCJPs to visit these two forums as often as possible.
and yes,don't forget to play the Rounds Up game.
i had followed these during my preparations:
The Complete Reference Java2 by Patrick Naughton
Khalid Mughal
Jwhiz and JQ+ for mocks and found them to be very useful.i would recommend these 2 test simulators to all those aspiring for a high percentage in JCP.i think these 2 are more than sufficient.
According to what i found,the exam tests one's fundamentals in one should be very clear and strong conceptually.also one should try to practice as much coding on the machine as possible.
i found lots of questions on I/O,threads and inner classes in my one should do these topics more thing,one should not leave any topic mentioned in Sun's SCJP objectives because i got questions from almost each of them.

it has been a great experience for me to be a part of a great and wonderful site like Javaranch(found accidently while surfing) and wish it all the very best.i have recieved a lot from it and would like to repay it back by continuing to visit and participate in its discussions as and when i find time.
Thank You JAVARANCH and all u Java Ranchers out there.......
20 years ago
Thanx Suresh and Arjun for ur explanations which have cleared my doubt.
Thanx Gurpreet for ur explanation.
Can transient variables be final and static?
In a Ques in jwhiz there was an option that transient variables may not be final and static which they considered it to be correct.In explanation they said transient variables can never be final and static.
i have tried the following code and it compiles and runs fine.
transient final static int i=45;
since in the option maybe word we can take this option to be correct.However in khalid book, it is said that transient modifier should not be used on static variables since they donot belong to an object.
kindly comment.
hi all,
i am unable to understand what the following question is asking?
Given classes A,B and C where B is subclass of A and C is a subclass of B, which one of these boolean expressions correctly identifies when an object o has actually been instantiated from class B as opposed to from A or C?
Select one right answer.
a.) (o instanceof B) && (!(o instanceof A))
b.) (o instanceof B) && (!(o instanceof C))
c.) !((o instanceof A) | | (o instanceof B))
d.) (o instanceof B)
e.) (o instanceof B) && !((o instanceof A) | | (o instanceof C))
Correct ans given is option b
pls tell me why b is correct and what is the question asking for?
hi leena,
The current thread gives up control of CPU to the threads of same or higher priority waiting in Ready to Run state.however, if no thread of same or higher priority is found,it will continue to run.
hi everyOne,
kindly look at my previous post and give ur comments.i am getting very confused since some says the code compiles fine whereas in jdk1.2.1 on my machine i am getting compile error needing explicit cast.
pls confirm.
hi all,
why is there no implicit narrowing conversions for int constants for parameter passing in method calls to invoke methods?
where as it is there in assignment context?