ganesh kannan

Greenhorn
+ Follow
since Jan 17, 2009
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 ganesh kannan

Congrats Himanshu! Same score as mine
15 years ago
yes John,
agree. I didnt see the code properly. So while(!isReady) condition is satisfied as isReady is false and the thread goes in an indefinite wait and there is no way for it to call the notify in produce(). Right?
Hey,
so there is only one thread that calls the run method. So always consume() will be called ahead of produce(). So if thats the case then isReady flag will be false and not true. So the thread will never enter the while loop instead it will just be in an infinite loop checking everytime the isReady flag is true or not.So the thread never goes in Wait mode at all.
Kindly correct me if what i typed is wrong.I am also just learning threads.

Thanks
Hi all,
Thanks for your support here in JavaRanch. I wrote SCJP5.0 on Jan 24th (saturday) ad i got 91% The only problem i faced was connectivity with the server in the Prometric testing center. My machine got disconnected 8 times in the course of 3.5 hours which irritated me and also took away valuable exam time. One thing to note is that i wrote the exam in the last slot of the day (8PM) may be thats why the server was down. My sincere advice to you guys taking the exam is that down take it in the last few slots(read it as after 6PM). Write it as early as possible in the day. Other than that the questions were not that difficult.(Not like the mock exams), in fact very very simple. So dont be scared of the exam. You can do it. All the best all of you!!
15 years ago
Hi Ankit,
I just rechecked it in my 5.0 book. Its same as what i typed(List<? super E>). So which is the correct answer? G.None of the above or B,E,F ? Could anyone give proper explanation for this? So it an error in the book??

Thanks,
Ganesh
Thanks a lot Ankit.

Yuan you can assign List to ArrayList using a cast

List<String> list = null;
ArrayList<String> a = null;
a =(ArrayList<String>)list;


I am writing SCJP5.0 on 24th Jan. Can anyone tell me whether the diddiculty level has crept in a litter more than 2008? or is it same as last year??
Hi all,
I have joined JavaRanch today. Hope you all would help me become a good java cowboy!
I am preparing for SCJP5.0 and im using K&B SCJP5 book. I am not clear about a question in Generics(Q16).The question is:

Given a method declared as public static <E extends Number> List<? super E> process(List<E> nums)
A programmer wants to use this method like this:

//INSERT DECLARATIONS HERE
output=process(input)

Which pairs of declarations could be placed at //INSERT DECLARATIONS HERE to allow the code to compile(Choose all that apply.)
A ArrayList<Integer> input = null;
ArrayList<Integer> output = null;

B ArrayList<Integer> input = null;
List<Integer> output = null;

C ArrayList<Integer> input = null;
ArrayList<Number> output = null;

D List<Number> input = null;
ArrayList<Integer> output = null;

E List<Number> input = null;
List<Number> output = null;

F List<Integer> input = null;
List<Integer> output = null;

G None of the above

Could you please check the answer with proper explanation (easy to understan huh! )

Thanks in advance