Win a copy of Python Continuous Integration and Delivery this week in the Python forum!

catherine powell

+ Follow
since Oct 07, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by catherine powell

Hi Everyone,

I just passed the SCJP 1.4 exam yesterday...Yeah! My score was 96%.

I spent a lot of time preparing for this test so I am just so happy.

I had taken an excellent Java class in the Spring of 2003 (Hofstra UCCE...can you guess how I found out about JavaRanch? I definitely owe the class instructor, Thomas Paul, many thanks). However, I didn't begin to study for the certification test until about 1 year ago. Since then I've spent about 6 months in total studying for the test.

I read the following books to review Java in general:

1) HFJ by K&B - I absolutely LOVED this book and think it should be everyone's first book in Java. The basics are very clearly explained and the authors have a really great sense of humor.

2) Just Java 2 by Peter Van Der Linden - I don't know why this book isn't mentioned more often because it's just so well's written in a easy to follow conversational manner and it covers Java at a greater depth than HFJ.

Next I read the K&B ver 1.4 Sun Certified Programmer Study Guide for Java 2. It is such an immensely helpful book that is geared specifically for the SCJP test. It points out all the gotchas and I'm sure studying it contributed a lot to my high score. I don't know anything about Biodiesel but this book ROCKS!

Finally, I worked on mock exams - mainly with the Whizlabs SCJP 1.4 exam simulator. I completed all 12 tests (Diagnostic, 10 practice and Final) and my average score was about 75%. I did notice that as I completed more and more mock tests, my scores were consistently getting higher. After I finished taking all the Whizlabs mocks, I re-took the 3 Whizlabs mock tests that I had scored the lowest on and this time my average score was 85%.

The day before the test I took 2 of Marcus Green's mocks (one was for ver 1.2 and the other was for ver 1.4). I didn't bother to add up the score for the 1.2 version test since I skipped the IO and AWT questions. I scored 91% on Marcus' mock for SE 1.4.

I know everyone says this, but I also found it to be true...I thought the Whizlabs tests were, in general, more difficult than the real exam. I also found Marcus Green's Mock Exam questions to be about the same level as those on the actual exam.

I hope this information concerning how I prepared for this test is helpful. I'd also very much like to thank the Ranchers who helped me when I posted questions for generously taking the time to answer them...Catherine
12 years ago
thank you very much Scott for your reply!
Hi Everyone,

I came across a comment on an old Marcus Green mock exam answer explanation:

You may get questions in the exam that have no apparently correct answer. If you are absolutely sure this is the case, do not check any of the options.

This is quoted from the answer explanation of question # 8 on exam # 3 for ver 1.2, I believe. I plan on taking the 1.4 version of the exam very soon. Does anyone know if it is possible that there will be any questions that puposely don't have a correct answer listed as an option...that is, the correct answer is to not check anything?

Thank you very much in advance...Catherine
I'm clear on this now. Thank you guys so so much!
there's an EXCELLENT article called "The SCJP Tip Line Implicit Conversions, Explicitly" by Corey McGlone about this topic that helped me a lot.
[ November 17, 2006: Message edited by: catherine powell ]
Hi Jim,

Thank you so very much for looking at this.

The Whizlabs code created a string object using the new keyword with the string literal "xyz" (not "abc") and it was the first time "xyz" was referred to.

so then the above code reflects 5 new objects created (not 4), right?

Please forgive me for keeping at this question. I just want to make sure that I understand fully. Thank you again...Catherine
oh I'm even more confused...

K&B 1.4 Guide pg 360 says...

String s = new String("abc") ; // creates two objects, and one reference var

But Whizlabs question indicates only one object created with similar code and several ppl agree.

Am I missing something?

Thanks everyone...Catherine
From Whizlabs SCJP mock ver 1.4, Test #3, Question 23...

How many String objects will be created when this code is executed?

String s1 = "abc"; //creates 1 obj
String s2 = new String("xyz"); //creates 1 or 2 new objects?
s1.toUpperCase(); //creates 1 obj
String s3 = "abc" //No object created (String Pool)
String s4 = s3.replace('a','A'); //creates 1 new object

They have 4 new objects as the correct answer. Based on previous posts shouldn't the answer be 5 new objects? I just want to double check.

Thanks for your help...
thank you so much!

I believe I found the documentation in the Character Class API...

The char data type (and therefore the value that a Character object encapsulates) are based on the original Unicode specification, which defined characters as fixed-width 16-bit entities. The Unicode standard has since been changed to allow for characters whose representation requires more than 16 bits. The range of legal code points is now U+0000 to U+10FFFF, known as Unicode scalar value...

The set of characters from U+0000 to U+FFFF is sometimes referred to as the Basic Multilingual Plane (BMP). Characters whose code points are greater than U+FFFF are called supplementary characters.
A char value, therefore, represents Basic Multilingual Plane (BMP) code points, including the surrogate code points, or code units of the UTF-16 encoding. An int value represents all Unicode code points, including supplementary code points...

The methods that accept an int value support all Unicode characters, including supplementary characters.

Thanks again for your help...Catherine
[ November 16, 2006: Message edited by: catherine powell ]
12 years ago
Hi Everyone,

I just have a small question that's bugging me regarding the API documentation on Sun's web site for the indexOf method of the String class that takes a char argument...why does the documentation have int listed as the arg data type:

public int indexOf(int ch)
Returns the index within this string of the first occurrence of the specified character. If a character with value ch occurs in the character sequence represented by this String object, then the index (in Unicode code units) of the first such occurrence is returned. For values of ch in the range from 0 to 0xFFFF (inclusive),...

ch - a character (Unicode code point).

Thanks very much in advance for your help...Catherine
12 years ago
Thank you very much for the information, Keith.
Hi Everyone,


1. that the compiler performs an implicit conversion for assignments when an expression is a constant expression of type byte, short, char or int; the type of the variable is type byte, short or char; and the value of the expression is within range.

2. it is legal to access a static variable through a reference to an instance of the class

I don't understand why this doesn't compile:

I'm getting the following compiler error: possible loss of precision
found : int
required: byte
byte b = ctc.x + ctc.y;

However, everything compiles and runs as expected if I change the line of code which declares the variable b to read:

byte b = x + y;

Thank you guys very much in advance for your help!

Thank you Marc and Praveen for clarifying this topic for me. I've bookmarked this helped me a lot. Thanks again...Catherine
Hi Everyone,

I have the same questions that were never answered in this old post (except I understand that anonymous classes are implicitly final (�15.9.5))...

1. Does anyone know if there is any way to specify a modifier (for example strictfp) on an anonymous class?

2. Am I correct in saying that the only modifiers that can be applied to static nested classes are: final, strictfp, public, protected and private?

Thanks very much in advance...Catherine
Hi Bert,

If there's enough interest, I think it would be great if you did have another Study Aid Contest.

I wish i knew of an easy way (other than by rote) to memorize all of the methods in the different APIs. The only thing I've come up with is for the static Thread methods in SE 1.4:

SYNCH AID (as in an synchronization aid)

(sleep, yield, enumerate, currentThread, holdsLock, activeCount, interrupted, dumpStack)

If anyone has any good ones for any of the APIs I would very much love to hear them.

Thank you...Catherine