Morteza Manavi-Parast

Ranch Hand
+ Follow
since Dec 25, 2008
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 Morteza Manavi-Parast

Thanks buddy, See you around then.

Good Luck,
Morteza
13 years ago
Sunil,

Thank you. Well, actually this book does not come with a pdf version. However, if you buy the book, it’s included with a free 45 days subscription to the SafariOnline website which then you will have access to the full book’s online version.

So unfortunately I have not much things to share with you other than 3 pdf chapters from the book which you can freely download them from the link below:

http://www.ii.uib.no/~khalid/pgjc3e/samples.html


Plus, its mock exam engine is also freely available from here:

http://www.ii.uib.no/~khalid/pgjc3e/engine.html
13 years ago
Abhay,

Thank you, and if you only made it up to chapter 4 so far, then I would say you still have a way to see much more beautiful things…. Wait until to read the chapter 12, 14 and 15… You’ll love it!

Plus, don’t miss the vital book errata! There are quite a few corrections for the first printing. You can find it from the link below:

http://www.ii.uib.no/~khalid/pgjc3e/errata.html
13 years ago
Ruben,

Thanks so much, it’s very kind of you to say that. Everything you said about my level of Java knowledge is truly deserved yourself. I personally learned quite a few things from you and I’m pretty sure it’s the same case for lots of other folks in this forum.

By the way Congratulation on your great score man! Way to go! Actually at the exam, I also had a strong feeling that one of my question was wrong too but I didn’t surprised at all as I heard the same story from other fellows in here before. But anyhow, like you said, no big deal…

I’m interested to know what would be your next step? Going for SCWCD or SCBCD right off the bat or just wait for a bit to see what Sun certifications is going to as a result of upcoming Oracle/Sun merging?

13 years ago
Right on! I was one of your first customers!
I nailed down SCJP 6 exam yesterday! I did 84%, however, was a bit frustrated with my score, as I was aiming confidently to score 100%. During the exam there was only one or two questions that I was not too sure about the answer so I was expecting something around +95%...

I would like to thanks so much Khalid Mughal and Rolf Rasmussen for their wonderful, amazing, great, book on SCJP 6: “A Programmer's Guide to Java SCJP Certification: A Comprehensive Primer (3rd Edition)”. Actually this book is recently published and I was blessed to have the opportunity to read it before going for my exam. This book saves me a great deal of time by answering lots of my questions that otherwise I would have to perform a lot of research to find them. Such a technical, insight and deep approach to SCJP… Just “Perfect” I would say. It turns out to contain a number of beautiful questions at the end of each section that helps to build up a solid and deep understanding of the exam concepts. I read this book from cover to cover and it amazingly takes my Java knowledge to the next level, a level that makes the SCJP exam questions a piece of cake for me; and in some parts I would say even ridiculous!!

Thanks to Devaka for his fantastic ExamLab! Devaka, Your exam simulator rocks man! Keep up the great work!

Also I should thank Kathy and Bert for writing an interactive and live SCJP 6 preparation book. I read this book from cover to cover too.

Last but not least, thank you all ranchers! All those who answered my questions and all those who asked something here; therefore made me learn new things or reinforced my knowledge by clearing their doubts.

I started from almost zero Java knowledge and spent a few months for my exam preparation by reading more than six books and went over three exam simulator. Therefore, I think I have good points to share here. So, if you are pursuing a SCJP certification, the rest of this topic is for you: I’ll let you know everything you need to know for effectively passing the exam:

Books:
If you want to read just one book then defiantly go for Khalid and Rolf SCJP 6 book. However, if you are new to Java or learning it as your first programming language, then you might find it a bit hard to start with, in this case you may want to buy Kathy & Bert book first and read it as an introductory material.
In addition, if you are new to Java or coming from other programming languages with zero java experience (like me) then you may need a practical book which makes you start coding, this was one of my initial concerns when I start studying for SCJP, to find a book that I can practice Java coding with; hence, I tried quite a few Java books for this purpose. It turns out that my favourite become “Murach's Java SE 6”. It teaches Java to you so much, so fast and so thoroughly by make you start coding right off the bat! I also tried Thinking in Java and Head First Java but none them was appropriate for this purpose. (Even not appropriate for SCJP!)

Generics:
For learning Generics (if you are so passionate to gain a deep knowledge like I was) you can go for “Java Generics and Collections by Maurice Naftalin and Philip Wadler” I found it a useful one but I would say you don’t need it for the exam. Khalid and Rolf book has an amazing chapter on Generics which gives you perfect knowledge which enables you to deal with almost any type of Generics questions way higher than the exam level! Also don’t miss Angelika Langer Generics FAQ too. She has the answers for your Generics surprisings!

Exams:
Well, you know where to go for this one: our perfect Examlab software! But just a caveat here: don’t consider this as a self assessment tool for the last days! Instead, try to answer its questions during your preparation process, even as soon as when you finish each objective. I made a mistake to leave it up for the last week and I did not find enough time to go over it more than once.
Khalid and Rolf book also comes with a Mock exam which is very deep and helpful. And yes Master Exams are so important too! Even though it’s a pain to answer the Master exam questions through its simulator software but make sure that you finish all three Master Exams before going for the exam cause you may find it very helpful at you exam day ;-) I believe you can freely download it from the “Learn key” website even if you don’t buy the K&B book.
Other than that, in my opinion, you absolutely don’t need any commercial Mock exams at all! The sources that I introduced so far contains over 1000 questions which is enough, more than enough! I also bought ePractice exam from Sun but it has nothing more than that free self assessment exam available freely on Sun SCJP webpage.

Java Ranch:
Contribute to this forum! Believe me it lets you learn many new things or reinforce your learned concepts. You learn concepts but forget it too quickly? Start discussions about it with other folks in here. That concept will be tattooed on your mind!!


Ok, fellow ranchers: Good luck to you all! Study with passion and when it's time to going for the exam, beat it hard and beat it deep!


All the Best,
Morteza Manavi-Parast
13 years ago
No. The upper bound wildcard parameterized type (<? extends object>) are equivalent but they are NOT “absolutely identical”

Here is a case that you can see the difference:

Hi Bert,

Thank you so much for considering this thread. As a matter of fact, Ruben exactly explained what I wanted to say. In my opinion thrown programmatically means “explicitly thrown by the API developer in the code”.

When I looked at your SCJP 1.6 book at the table 5-2 on page 382, I see that you specified NumberFormatException, IllegalStateException or IllegalArgumentException as “Typically Thrown Programmatically” which is absolutely compatible with my opinion, having said that, I think AssertionError cannot be in the same category with those guys.

So, in conclusion, I differentiate an Exception source by “Who throw it” instead of “Who cause it”; since almost always we (Programmers) are the cause of the exceptions and under the hood the JVM or the API developer responds to us by throwing an exception.

However, still I’m very interested to know about your opinion in this regard.

P.S. Thanks Ruben for the nice explanation!
That's becasue thread t is wait for the object Trd (wait means this.wait() and this is refer to the runnable trd object), and the main thread notifyall() the thread t object! No! that's not right! Main thread should have notifyall the trd object instead.
Yes. That's because you can legally cast any class to any non related interface with no problem:

The reason behind this behaviour is that compiler think one of the sub classes of that class might implement the interface so it lets the cast to be done. Same thing with instanceof (try this: a instanceof Face)

BUT if the class is final, then the compiler would not let you to do the cast casue there is no subclass for that final class that might implements the interface:

Integer i2 = 2;
Runnable runabble = (Runnable)i2;

Make sense?

Programmatically thrown in the sense not explicitly throwing the error in the program. It means an exception or error caused solely because of your program at runtime.


Thanks for the reply, but then I would say all of the exceptions are programmatically thrown. I think in the K&B book they are categorizing the exceptions and errors in the essence of which is thrown by JVM and which is thrown by API developer and so my concern is more about the source of the exception or error being thrown than the reason of it. But whatever, I don’t want to start a debate on this since I’m very close to my exam. So do you think that if I encounter this on my exam, I should mark it as a programmatically thrown error?
While in the K&B SCJP 6 book on page 382 mentioned that AssertionError is thrown Programmatically, I found this to be thrown by JVM according to other sources. I personally think the source of this Error is JVM since this is the JVM who throw the Error when assertion is enabled and the assert expression is evaluated to false. I checked the javadoc and JLS for assertion error and could not find any explicit statement about whether it thrown by JVM or programmer. So is it a mistake in the book or it really thrown by programmer?
Well, Yes and No.
Yes because if you run this program you will see the resulting output over and over since the code is written in a way that would most likely produce that results. BUT NO because we know that when it comes to thread scheduler, nothing is guaranteed!!

Regi,
What if I write a JVM that does not have a round robin scheduling, for instance, my JVM thread scheduler is non-preemptive means that the main thread will not yields until it finish its execution and then it will go into dead state and allow other threads to get CPU time. Let’s run the above code on my JVM:
Main thread starts, write “D” then sleeps (500ms) then wakes up creates a new thread (s1.start()) then sleeps again (2000ms) then enter the synchronized context, notifyall, do sleeps and then print E and finishes. So now my JVM gives the time to the other thread and it will prints A, then sleeps and then waits for ever! So the output would be: “DEA” and the program will never terminate!!
And I’m telling you that this is absolutely legal JVM implementation according to the specification.

So the precise answer to this question would be “the result is not predictable”
There is a error in this one:
It says: Which of the following classes, not implement the Serializabale interface:

* A java.lang.String
* B java.lang.Object
* C java.io.File
* D java.io.Console
* E java.util.TreeMap
* F java.util.HashMap

Option B & D are both correct; however it just asks for one correct answer...
I don't think you ran my code, cause I remove that age variable! It runs perfectly and display appropiate results.
A long as you check for nextInt(), you can give any combination of string and int that you want to the scanner.