File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Follow the code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Follow the code?" Watch "Follow the code?" New topic
Author

Follow the code?

Rob Mech
Ranch Hand

Joined: Apr 05, 2007
Posts: 56
I'm hoping that I can get someone to help boost my confidence here. I'm currently studying for the SCJP and I'm picking up the material in the studyguide extremely well. In fact I'm scoring 50% or better on each practice test in the book. (I take them the following day not 5 minutes after I read it).

While those arent stellar numbers the majority of my incorrect answers are because I'm failing a lot of times to see VERY small details in the code. I've been programming for 15 years in various languages and while the material is easy, some of these code snippets are INSANE. It's almost unfair how a detail of a code piece can smoke you regardless of the compententcy of the topic area.

Now the book says "watch for this, etc. etc." and they have come out and said the book tries to throw you for a loop (in preparation for the exam.) I'm all for studying but I dont see a way to study for code thats written just to trip you up.

My question is (are you still with me) just how tough ARE these code snippets on the exam? I've seen others on the web that look complicated but easy to follow. Should I give up now? Is there more Hype than fact here? Like I said I've been doing this 15 years and the topics are easy, it's these code blocks that are killing me!

Honest feedback?


Rob Mech, SCJP 1.5<br /><a href="http://www.robsprogrammingjunk.com/" target="_blank" rel="nofollow">http://www.robsprogrammingjunk.com/</a>
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

I didn't find the actual exam to be "tricky," but certain details are important. Some mock questions out there are a bit on the extreme side, but if you get through them, the real test should be easy.

Which study guide are you using? Can you give us an example of what you're talking about?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Rob Mech
Ranch Hand

Joined: Apr 05, 2007
Posts: 56
I'm using the Sun Certified Programmer for Java 5 Study Guide (Sierra & Bates)
Before purchasing it I read just about everywhere that it was "the best" for studying for the test. I'm hoping that it's the best just because it is so tricky.

This one tripped me up. I knew darn well what the problem was once I had already answered it wrong.

Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Hi Rob,

Glad to hear that you have worked on several languages.
I hope you learned C too. The Big Mother.

Its simply creating int array and assaing it to void type. and using casting so as to convert back to explicit datatype.

int *i1 = (int *)malloc(sizeof(int)*10); // 10 integers
void *p=i1; //assiging it to void pointer
int *i2 = (int *)p; //casting void to explicit type; correct
int *i3 = (int)p; //incorrect.

Compared The Mother The Child(java) is Much simpler to code.
Hope this is clear.
[ April 16, 2007: Message edited by: Srinivasan thoyyeti ]

Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Rob Mech
Ranch Hand

Joined: Apr 05, 2007
Posts: 56
I didnt have a problem with WHAT it was doing. I had a problem picking out what was wrong with it. That's the issue I seem to be having.
Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Hi Rob,

You didn't understood the mother.
Coming to child code..

1. class Dims {
2. public static void main(String[] args) {
3. int[][] a = {{1,2,}, {3,4}};
4. int[] b = (int[]) a[1];
5. Object o1 = a;
6. int[][] a2 = (int[][]) o1;
7. int[] b2 = (int[]) o1;
This is the blunder
We can't convert a two dimentional array object into one dimention array Where as this will work ...
int[] b2 = (int [])((int[][])o1)[0];
// taking out the first 1st 1-Dimensional array

8. System.out.println(b[1]);
9. } }
Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Hi Rob,
Rob:My question is (are you still with me) just how tough ARE these code snippets on the exam? I've seen others on the web that look complicated but easy to follow. Should I give up now? Is there more Hype than fact here? Like I said I've been doing this 15 years and the topics are easy, it's these [censored] code blocks that are killing me!


I haven't seen that many no of languages as you have.
I know Pascal,C,C++,Cobol,Java.

Of all these languages the one which is easy when compared to others is "JAVA".

Why so
1. Java has less complexity compared to c++, by eliminating the concept of pointers code.
2. Java has versatile API, really rich.
3. Java is plateform independent.
4. I like to say Interface is another big asset of java.

Hence Java code is much programer freindly(radable,understandable,extensible).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Follow the code?