Ashish Laddha

Greenhorn
+ Follow
since Apr 12, 2005
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 Ashish Laddha

Rather than advantage, I would say one of the feature in the latter case is innerclass object can be referenced by superclass reference.
Hi Bert,
I confirm that I had to go thru 035 and not 055 at that time. I took the bonus exam some one month back.

About other book, I had referred Philip Heller
17 years ago
Congrats Dude.
17 years ago
Thanks Bert and Everyone!!
And Prathima, about guidelines for studying
1) I had gone through Philip Heller,Simon Roberts some 4 months back.
2) Then I caught hold of K & B. I personally feel K n B is pretty handy for the exam. I like the challenging questions which mixes one concept with other.
3) I have been regular visitor of Javaranch and thank them for their contribution.
4) I took the K n B Master Exam and Bonus Exam. They were good. I did not like the bonus exam because it did not have 5.0 stuff. They need to update that exam soon.
5) Complete your whole course at least 4/5 days before the exam and solve a good number questions.
6) If you are through with the basics, PAY FULL ATTENTION DURING THE EXAM.
7) There were some interesting questions on Thread. Understand and practice Thread and Generics.

Take good nap before the exam and give it best shot!!

Best Luck.

Java Rulz,
--Ashish
17 years ago
Hi All,
A relieved soul speaking now Ya, today I passed SCJP 5.0 with 98%. No doubt, I am happy about the score. Hmm, about the actual exam, it was intriguing and made me think a lot, especially on Thread. But, I feel, if your basics are clear, it is all about application of those basics.

I became regular hitter of javaranch from the past 20/25 days and only after that got K & B Book. I must thank both of them. It was a really great exercise to have a go at questions at the end of each chapter. Lot of them are very thoughtfully done. Thanks for making my pre-certification life tuffer!! Secondly, thanks Javaranch which definitely helped a heaven!

One more thing I would like to add is it helps if you practice. And when you take a piece of code, try to play around it, do this, do that. The understanding increases by hands-on!

I plan to note those nitty-gritties and put them on some blog sooooon.
17 years ago
Hey Congrats. Great Percentage!!!
Tell me, How about the duration? How early were your through your questions?
17 years ago
Vighnesh, plz read the questions correctly. It is asking "How many... "
The answer is 5 i.e. 5 of them are correct, not that only Option 5th is correct.

The incorrect one is

transient private native void m1(){}

transient is invalid modifier for method.

Hope, it helps.
I mean, "since c1 and o1 are ..."
11. Given:


1. import java.util.*;
2. public class Fruits {
3. public static void main(String [] args) {
4. Set c1 = new TreeSet();
5. Set o1 = new TreeSet();
6. bite(c1);
7. bite(o1);
8. }
9. // insert code here
10. }
11. class Citrus { }
12. class Orange extends Citrus { }

Which, inserted independently at line 9, will compile? (Choose all that apply.)

A). public static void bite(Set<?> s) { }
B). public static void bite(Set<Object> s) { }
C). public static void bite(Set<Citrus> s) { }
D). public static void bite(Set<? super Citrus> s) { }
E). public static void bite(Set<? super Orange> s) { }
F). public static void bite(Set<? extends Citrus> s) { }
G). Because of other errors in the code, none of these will compile.


Since, c1 and c2 are non-genric, passing it to generics will compile, albeit with unchecked warnings.

The answer given are A, E, F.
But, B, C, D also get compiled (again, with unchecked warnings)??

So, I think the answer is answer A, B, C, D, E, F
The same is true for false


compiles fine

whereas


throws compile time error
Just putting the code

class CallMain
{
static int count;
public static void main(String args[])
{
try
{
System.out.println("Main Called"+ ++count);
String anotherArgs[] = {"K","P"};
main(anotherArgs);
}
catch(Throwable e)
{
System.out.println("Throwable is:"+e);
}
}
}

And I dont think 9112 has some signifiacance. For me it is some other number. It is just that when the stack gets overflown, the error is thrown.
Now, let me ask another question

"How to increase the size of the stack?"
The point which is clear is
-> For creation of Inner, we need an instance of Outer.

The point which is not clear is
-> By calling o.super(), how are we making instance of Outer available for creation of instance of Inner

I guess, you got the doubt.

Here At line o.super() before call to Super class constructor(i.e. Inner class constructor), u already hav a Outer instance o as a context.



Can you explain how the context is formed and o becomes available to it.

Thanks in advance.
I agree with you. -cp should come into picture when the .java being compiled uses some classes. In this case, that doesn't seem to be the case. So, -cp is irrelevant.