Ivan Ivanic

Ranch Hand
+ Follow
since Oct 31, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ivan Ivanic

Great score

This should have been posted on Sun-Certification-Results

edit: corrected grammar ;)
15 years ago

camilo lopes wrote:you might have one reference to class father. see:



What does this mean???
I suggest you to postpone your sit for the exam. If you are not ready (as result suggest) better take some more time to learn.
Kind regards,
Ivan
You are correct. Sleep is static, don't know why they did not marked it as correct

If you want to access inner class instance you have to have outer class instance. So if you are accessing from static method(such as main) you have to create instance of outer class and then access inner class through it. If you are accessing from non-static method of outer class than you don't need an instance of outer because you have implicit this, like in tryInnerClass method.


When loop encounters continue in code it will immediately start next execution of loop. So whenever i < 5 line 5 will never be reached. So this snippet only prints number 5, 6, 7, 8 and 9.

Chaitanya Lele wrote:
Since static methods cant be overridden the rules of overriding shouldnt apply, ie the doStuff() method in B is not an overridden version of doStuff() in A.


Here is where your logic is faulty. The rule is that you can not override static method. It does not mean that compiler will treat method B as not overriding A, but means that compiler will not allow declaration of static method with same signature in subclass. So you can not even attempt to write static method with same signature.
Hope this helps.
Ivan
Hi Montyfirst,
please choose better section of forum if you want to get your answer as soon as possible. I suggest this one.
Kind regards,
Ivan.
Here you should watch two things:
1st) is that one case here is obviously more fragile than other cases. Line 1 depends on some other class. All other cases are primitives, primitive wrappers or String literal(which is class instance, but in this context is more closer to primitives than full-fledged class).
2nd) names of classes in Line 1. They are not obviously connected in some natural way. Subscriber is not part of Tower. Think about it. Subscriber is not needed to make Tower. Other cases are passing some parameters that might actually be important for Tower construction. Like: String literal "413-08" could be register number of Tower, name of Tower. In case where Subscriber is passed it just does not make sense. How the heck is Subscriber needed for construction of Tower???

What do you think where is coupling tighter in this two examples:
1. Car car = new Car(new Engine());
2. House house = new House(new Dog());

Think about difference between this two.
Car is not a car without Engine, but House is House without Dog, although it can have a Dog inside.
Hope this helps a bit ;)



On The Exam you will have paper and pen or whiteboard and marker. Always use them to visualize things that are hard for you to follow: execution of loops, creation/garbage collection of objects, inheritance... Draw, write, sketch use lines, rectangles, dots - anything to keep your mind working.
Take your time to actually think, that way you will not get stuck in a place.
All the best wishes for your exam,
Ivan.
This is quite easy to understand:
For-each loop has internal counter that moves pointer to next element in each iteration.
So:
1st iteration
here is how array looks:

So code

assigns value of 1 to i because pointer points to that value in arr.
That said code looks like this:

and changes arr to look like this:


2nd iteration:
Pointer moves to the next value:

So code

assigns value of 0 to i because pointer points to that value in arr.
That said code looks like this:

and changes arr to look like this:

3rd iteration:
Pointer moves to the next value:

So code

assigns value of 3 to i because pointer points to that value in arr.
That said code looks like this:

and changes arr to look like this:

4th iteration:
Pointer moves to the next value:

So code

assigns value of 0 to i because pointer points to that value in arr.
That said code looks like this:

arr[0] is changed but to the same value and looks like this:


I hope this helps
Hi Sridhar,
sorry to hear that. But keep your head high. It is not the 6 that is hard but SCJP any version.
I failed 5 with same score as you 58%.
I passed 6 with 84%. Belive me those are same (THE SAME) exams except that you can get few questions from 6 and lots of additional time(hour or so) if you choose 6.
I was learning until I had 90+ in mocks (jchq) and than I set for the exam.
Compared to my first session when I failed and felt that I don't have enough time, this time I thought when I started that all easy questions come in the start. But as I continued doing exam I noticed that all questions are now in range of my knowledge. I have done exam in 2h30m so I have left with an hour to review my answers.
I have had 84% simply because I never aimed for much higher result.
So I definitely advise you to go for 6. Belive me I felt so much better when I finished all questions and had an hour more to review them.
Good luck next time
[ May 31, 2008: Message edited by: Ivan Ivanic ]
16 years ago
wait (long)
which ever is first will invoke thread to runnable. call to notify - notifyAll or specified time has elapsed.
the rule that you written here is applicable only to interface METHODS.
you can apply strictfp on interface or abstract class declaration, but you can not use it on abstract methods whether they belong to class or to interface.