Win a copy of Terraform in Action this week in the Cloud forum!

Abdul Rehman

Ranch Hand
+ Follow
since Nov 07, 2006
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 Abdul Rehman

Hi Burkhard,

Originally posted by Burkhard Hassel:
The correct answer is:
"This question cannot be answered, so it can never turn up on the exam!".


Exactly!
After taking the exam, my advice will be to focus more on things like "islands of isolation" and tricky GC questions involving array objects. And not waste time on such ambiguous things

By the way, I am surprised to find that you (Bu) have not yet taken the SCJP exam! I thought you have, since, I learned so many things from your posts prior to the exam!!! :roll:

Yours,
Abdul Rehman.
Hi pal,
I was also experiencing the same problem in mocks before taking SCJP 5 exam, but, I overcame it. I have noticed the following things:-
  • Whenever you make such a mistake, note it down in some notebook and pay due attention to it later.
  • By taking mocks frequently & regularly, you can rectify these mistakes & concentrate fully on the questions.
  • The more you rush, the more you lose concentration. Never rush through the code; rather, remain patient and read carefully and SLOWLY.
  • As Marc said, make a checklist for yourself, either written or simply in your mind.

  • Best regards,
    Abdul Rehman.
    [ January 20, 2007: Message edited by: Abdul Rehman ]
    You sandwiched the code in the transfer_action() method between a try-catch block, which is akin to what I was saying. I think that this will solve the previous problem and I don't think it will raise any more problems.
    Do you need help in any other thing?

    Yours,
    Abdul Rehman.
    14 years ago
    All arrays in Java, irrespective of their types, inter se implement java.io.Serializable & java.lang.Cloneable. Thus calling clone() on a reference to an array object will not throw a CloneNotSupportedException, albeit, you will have to catch the exception (as it is a checked exception).
    14 years ago
    Hi,
    The error you are getting is because you are calling a method which throws an unchecked exception, but, neither catch it nor declare it in the throws clause.
    Since, I don't know which method is throwing the unchecked exception, I cannot help much. But, my suggestion is that you do the following.

    Replace the following:

    with:


    Maybe, this will save you from the compiler error you are getting right now. But, if you use the above two methods anywhere else, be sure to sandwich the method call(s) between an appropriate try-catch clause.

    Best regards,
    Abdul Rehman.
    [ January 20, 2007: Message edited by: Abdul Rehman ]
    14 years ago
    My father wanted me to become a doctor, so, I chose pre-medical. But, I find myself more inclined towards Computer Science. So, I'll definitely jump into computer science & leave pre-medical.
    14 years ago
    Hi Tanakorn,
    Thanks for the comments.

    Originally posted by Tanakorn Numrubporn:
    This is the first question from me:
    Exam Watch: What would happen in a multi-threaded program if an exception propagated through the run() method of a thread? Will the thread crash only or will the whole program crash? Will the stack trace be printed? (In a few questions, you will see the exam tripping you on this concept.)
    What the question of this answer?


    Well, you know the "question to this answer", don't you? I will tell you the answer to the above question.
    If an exception propagates through the run() method of a thread, *ONLY* that thread will crash and a stack-trace *WILL BE* printed. Other threads will not be affected.

    Yours,
    Abdul Rehman.
    14 years ago
    Congrats pal on your success
    Nice score!
    14 years ago
    Lots of thanks to all ranchers for their great comments; special thanks to Bert and Pradeep--their words mean a lot to me


    [ January 18, 2007: Message edited by: Abdul Rehman ]
    14 years ago
    Hi.
    I am very glad to tell all ranchers that by the Grace of God, I have passed SCJP 5.0 exam with a mind-blowing score of ONE HUNDRED PERCENT (100%) !!! Well, its mind-blowing atleast for me--a 17 year old pre-medical :roll: student, here in Peshawar, Pakistan.
    I can say with utmost certainity that had I not visited Java Ranch then I would have not even passed the test!!! And of course, had I not read the K&B study guide then too I would have failed the test. My best regards are for Kathy Sierra & Bert Bates for writing this splendid great brilliant marvelleous (insert-three-thousand-other-words-here) book!!!
    I would like to narrate in detail here, my long story about the preparation for this exam. I had done Java when I was in 7th class/grade, about 6 years from now on. I could not take the certification exam then as there was no Prometric Centre in Peshawar. And more importantly, neither did I know anything about the certification exam, nor could I go to the capital, Islambad, to buy vouchers and/or take the test.
    Since then, I had been doing Java programming with JDK 1.3, more or less regularly, for making simple things for my own self. The idea to certify came in my mind in September 2006, as now I had a good ADSL internet connection, to find all the info required for the exam.
    Though, my real study for the exam was only for 25 days, I had hypothetically started preparing from September, 2006. I first visited Sun's website to find out about the new SCJP 5.0 certification exam. I started off searching for the JDK 1.5 CD & some good book, which would explain the new features. I was highly disappointed as there was hardly any book available for SCJP 5--almost all of them were for JDK 1.4.
    Luckily or unluckily, I found Java - The Complete Reference & Java - How To Program and finished them within a month. But I must say, don't you never ever study these books for the certification exam!!! They are not even close to what you will find on the real exam.
    After spending one month in this, I decided to read the Java Language Specification & Java API documentation for the relevant packages. I didn't know that I was going for a real rug-ride. I spent almost one-and-half months in this work, but, I had hardly gained anything.
    I read through the JSL & it was as if I was trying to grasp something which was well higher than my level of understanding. I learned nearly nothing from the JSL. To increment the suffering, the documentation which I was trying to memorize kept on "dissolving away" from my memory. I had realized in early December that I have been wasting my time in irrelevant things and I badly needed a good book specific to the exam-related knowledge.
    It was the greatest thing in my life when I found Java Ranch through a search engine. At first, I couldn't comprehend that I had discovered a Treasure Island!!!
    By reading through the FAQs & a few campfire stories and joining the saloon, I realized that this was the one-stop for all info I needed for the exam. Soon, I came to know that the K&B study guide is the dream book for SCJP 5 and I decided to buy it.
    Again, it was disappointing to find that there was no copy available in Peshawar or even the capital, Islamabad. I don't know whether this book is available in Karachi, Lahore, etc. or not. But, I managed to get a book of this book from a foreign country.
    It was the thing I needed--a book which alone would be sufficient to secure a 90%+ result in the SCJP 5 exam. It contains everything, but, precisely which you need for the exam. I love this book for its vivid explanations, specific purpose, brilliant mock questions & the captivating-and-some-what-humerous style. The mock exam questions in the book were splendid--in fact, they are even tougher & trickier than the ones you'd find in the original exam! I LOVE THIS BOOK!!! Take my words: its the best you will find on the face of this earth for the SCJP exam. I am really obliged and grateful to Kathy Sierra & Bert Bates for writing this master-piece. Keep it up!
    Since, I started studying this book rigorously in my vacations, I finished it in just 4 days. By the time I took the test, I had revised this book nearly 7 times. Although, I believe that the book alone would have been sufficient for a 90%+ result, I took a lot of practice exams.
    The K&B Master Exam and the Whizlabs Practice Tests were the best of all. In my opinion, they were tougher than the real exam e.g. I didn't find any question on the real exam, which tried to trip me with an unreachable block of code. On the contrary, I found one such question in Whizlabs. However, I would like to point out here that they were one or two type of questions on the exam, the type of which I had never seen in the mocks. For example, I believe that the following concept was not clear in my mind before the test:-

    Exam Watch: What would happen in a multi-threaded program if an exception propagated through the run() method of a thread? Will the thread crash only or will the whole program crash? Will the stack trace be printed? (In a few questions, you will see the exam tripping you on this concept.)

    Apart from Whizlabs and K&B, I took a few other mocks, in which, a great one was Marcus Green's exam. Thumbs up to Marcus for the effort!
    After all this study, I scheduled the test on 5th January, but, due to some problem, the test was postponed till 15th January by the Prometric Test Centre.
    My scores in the mock exams (roughly) were:-
    K&B mock exam: 94%
    Whizlabs: 93%-97%
    Marcus Green: 96%
    I once scored 100% in Whizlabs Final Practice Test, but, I never expected that I would score 100% in the SCJP 5 exam. All in all, it was one of the greatest experiences in my life.

    Lastly, for those who are preparing for the SCJP 5 exam, I few guidelines:-
    - Study K&B as much as you could & assimilate as much material as you can into your mind
    - Practice rigorously on questions related to Threads, String & StringBuffer manipulation, Inner/Nested Classes, Generics AND OO Concepts
    - Once again, practice rigorously on Threads, Generics and OO Concepts -- the last one is somewhat neglected, but, can cause trouble on the real exam.
    - Take as much mocks as you can
    - Be VERY VERY VERY attentive & concentrate wholly on the questions during the exam
    - Make a list of all exam-watches and read it an hour before the test (I did this too and its really helpful)

    Okay, fellow ranchers !!! That's enough for now... do ask if you need my help... I will try my best to help.

    Best Regards,
    Abdul Rehman.
    14 years ago
    Hi
    Can someone tell me which is the best university for software engineering? And my second question is which is better software engineering or computer science?
    I had just completed my Higher school education and am now looking for graduation oppourtunities.
    Thnx!
    15 years ago
    Yes, that was what I meant and I think its pretty clear in my post.

    Yours,
    Abdul Rehman.
    15 years ago
    Just a quick reply, using "import java.io.*" saves you from a lot of typing. For example, if you want to use a class from the java.io package, without import statement, you would have to write:-


    Coming to your question, "out" is a member of the java.lang.System class and a reference to a java.io.PrintStream object. When you type a statement, such as System.out.println("xxx"); , you are actually accessing the member "out" of the System class, which resides in the java.lang package. java.lang is implicitly imported into every program.
    Furthermore, you can use any class from the java.io package, without importing, e.g. java.io.BufferedReader. The import statement simply saves you from typing "java.io.", every-time you access a class from that package.

    Hope this answers your question.

    Yours,
    Abdul Rehman.
    [ December 01, 2006: Message edited by: Abdul Rehman ]
    15 years ago
    Yes, default access means you can't access it in another package. In the above case, the class has default-access, which means that the class is not visible in other packages. But, the method add() is public and is visible as well as accessible. This means that though you can't declare a reference of that class, you can still access the add() method, if you succeed in obtaining an instance of the class indirectly. This is what you are doing: indirectly getting an instance of the default-access class. Once you have the instance, calling a public method is not a violation of any rule.

    Yours,
    Abdul Rehman.

    Originally posted by jimmy halim:
    I don't think anonymous inner class has modifier beside what inherited from it parent (the inner-class).


    In the JLS, Section 15.9.5, it is written:

    An anonymous class is never abstract (�8.1.1.1). An anonymous class is always an inner class (�8.1.3); it is never static (�8.1.1, �8.5.2). An anonymous class is always implicitly final (�8.1.1.2).

    Yours,
    Abdul Rehman.