Sasha Ruehmkorf

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

Recent posts by Sasha Ruehmkorf

That's exactly the answer I feared the most ;-)

Thanks for your quick reply!
Hi.
I am sending http-requests to a webservice but am not interested in the response.

So I used the URL.openConnection()-Method, opened an OutputStream wrapped by an OutputStreamWriter and sent the request. But even flushing and closing this Writer does not result in the request to be actually processed by the service. I have access to the logfile of this service so I can see that the service receives this request (or starts to log and process it) not until I use the Connection.getInputStream()-method. Of course this results in my program waiting until the service has done a lot of processing and written the response. But this takes quite a long time and I don't need the response. (Creating a new Thread to send the request and wait is unfortunately not an option)

Anyone an idea where exactly the problem lies?
Hi Bharat.

You could find discussion about this topic here:
https://coderanch.com/t/263314/java-programmer-SCJP/certification/HAS-Relationship
or here:
https://coderanch.com/t/262463/java-programmer-SCJP/certification/Clarification-Sefl-test-book
or here:
https://coderanch.com/t/258840/java-programmer-SCJP/certification/Has-relationship
or here:
https://coderanch.com/t/253284/java-programmer-SCJP/certification/has-static-variables

But I am sorry, you won't find a definitive answer to your question there. Maybe because there is none as there is no clear definition of the term has-a-relationship? I would suggest to forget about this question for the moment. In the exam you will be faced with questions that have definitive answers!
[ June 22, 2007: Message edited by: Sasha Ruehmkorf ]
Erkin, may I ask how could you post into a topic in which the last post has been three years old? I am really confused, as I can only see topics that have been active in the last 30 days here...
"cannot find symbol" isn't really a helpful error-message.
eclipse says:
Bound mismatch: The generic method sort(List<T> of type Collections is not applicable for the arguments (List<T> . The inferred type T is not a valid substitute for the bounded parameter <T extends Comparable<? super T>>
Together with the above posts does that help?
I don't see the problem with your solution, but you could also try:

[ June 19, 2007: Message edited by: Sasha Ruehmkorf ]
17 years ago
Thank you all
17 years ago
Hi. I passed SCJP on Wednesday with 100%

My preparation:
I prepared for 2 1/2 months with at least 5 hours the day. After my diploma in mathematics, I had a highly theoretical approach to Java (At university I have learned a lot about computer science like finite automats, context-free grammar, analysis of algorithms and so on. But never delved into the depths of any specific programming language)
So, I started learnig with the bible about SCJP: K&B. I also rented some other books about this topics, but liked K&B the most: written in a casual tone, but dry and accurate when it has to. And the writers always kept in mind to just give you the informations you'll need for the exam, nothing more and nothing less. Thanks!

It took me 4 weeks to work through this book, taking all the self-tests directly after I made one chapter and scored about 50% on an average. So I started from the beginning, read every chapter a second time and wrote index cards about all the details I already had forgotten (I ended up with 900 of these cards...) All the time I wrote many small programms to check things out. I discovered the Java Language Specification at that time and read most of it, without the claim to memorize all these tiny little distinctions and rules, but it gave me a very good feeling about why things are the way they are in Java.

Now, I really had the feeling to understand every important (for the exam) concept and made the selftests of K&B a second time. This time scored about 70%, feeling very dissatified with my performance. It became clear to me, that my theoretical knowledge of concepts was sufficiant and my weak points were: Memorizing the API and especially: reading code snippets. Memorizing the API lead to another 200 index cards. As I tended to follow the flow of the given code snippets overlooking the basics (like missing imports, visibility of members or syntax like "case default:") I took the masterexam (without time limit) and trained to first scan every code regarding these topics like a compiler would and to spot oddities (like members marked final, explicitly given constructers but missing no-arg-constructers, members marked protected...) I felt really confident with the outcome and signed up for the exam. The last week I just took some other mock exams (K&B Bonus master exam, www.danchisholm.net and inquisition). My plan was to take all the mock-exams from the linklist here at JavaRanch, but I was so fed up with learning, that I only managed these three.

The exam:
Don't know what to say. Maybe I had a bit of luck: the questions I got have been absolutely straight-forward. No code snippets with more than 20 lines of code. No confusing thread questions (as others have experienced. I think there have been only about 5 thread-related questions). Many many generics questions. Before reviewing the drag-and-drop questions, a window popped up, warning me that previous answers will be deleted. The amount of right options have been given always. Most of the time there were no "code will not compile" options, but "code will not compile due to an error on line...". All questions I got, could be answered with the informations given in K&B, all! (Thanks again)

Some tips:
- It's not only important to understand the concepts but to find your own way of how to read the given code and not to overlook the pennys
- Make sure that pencil and paper is allowed in your testing center
- If you score 50% or more on the K&B exam (or bonus exam) and do not suffer from extreme exam nerves: You will definately pass the exam. (no responsibility is taken for the correctness of this information )
- If you are now planning to take the exam in the next months: Order the voucher till June 23 and use the code given here: http://www.sun.com/training/savings/retake.xml to get a free retake.

Good Luck!
17 years ago


I'll argue the converse. How comes, I was sure that point 3 stated that it is possible to extend from outside the package.

My certification exam starts in 2 hours and it seems like I have to read the questions and answers more carefully
If you have a reference variable of type List<? extends Animal> this variable could reference an Object of type List<Cat>. So, I think it's a good thing, that the compiler won't let you put dogs in it.
Just to be sure, that Ankith suresh's post is not being overlooked:

Option 3 is false. See post at 9:29 and to answer your question Ankith: If you don't give a constructor explicitly in the derived class, the compiler adds a default-constructor including a call to super() and this called constructor is not visible, so of course the compiler complains

1: yes
2: yes
3: no
4: no
5: no

[Edit]

And as there seems to be confusion around option 1, just see this code of three files:


A is referenced in another package.

[Edit 2]

Sorry Manfred, you already made it clear
[ June 12, 2007: Message edited by: Sasha Ruehmkorf ]
Rightclick on the class-File and then "References" in Eclipse. That's it! Thanks for the hint Stan.
17 years ago
or if you want a method, that can be passed Objects of Type Two or any subtype: You don't need Generics. Just define it this way:

void showTwo(Two t){...

Not really
With "system class" I meant all the standard classes that come with the Java2 Platform (in the packages java.lang, java.util and so on) So for example, is there a way to get a list of all the methods (like parse in DateFormat or parse in NumberFormat) that may throw a ParseException?
17 years ago