Roger Orange

Greenhorn
+ Follow
since Jan 28, 2009
Merit badge: grant badges
For More
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 Roger Orange

I want to match start and end comment blocks in some sql files.

how would I compile a pattern that matches strings that contain '/*'

i.e. escape the asterisk so it is matched as a literal character??




14 years ago
T h x Martijn, I could read the files with an inputstream set to process UTF-16LE
14 years ago
I am writing unit tests on some sql stored procedure files generated in MS SQL Management Studio. When BufferedReader reads these file there are spaces between every character.
They are encoded DOS\Windows UCS-2 little Endian, according to Notepad++.
14 years ago

Ruben Soto wrote:Have you tried putting the enum and the test class in a different package and trying to compile the test class then? By the way, the sound instance variable is not an instance variable of the constant specific class body (I don't know what that would mean.) It is an instance variable of the enum type Animals. Let me know if this doesn't make things clear.


Th x Ruben

It compiles, with the warning static fields should be accessed in a static way (Animals.DOG, Animals.FISH). The syntax on line 9 confused me. Constant specific class bodies allow you to override the methods defined in the body of the enum declaration for a particular enum constant.


cheers Todd
Are instance variables in constant specific class bodies public by default or is there a typo in this sample exam question?
8. Given:


What is the result?
A. woof burble
B. Multiple compilation errors
C. Compilation fails due to an error on line 2
D. Compilation fails due to an error on line 3
E. Compilation fails due to an error on line 4
F. Compilation fails due to an error on line 9
Answer:
® 3 A is correct; enums can have constructors and variables.
®˚ B, C, D, E, and F are incorrect; these lines all use correct syntax



cheers Todd
Thanks Roel

Roel De Nijs wrote:Hi,

Welcome to the Javaranch!

Take a look at http://www.sun.com/training/catalog/courses/CX-310-252A.xml. There you can read the following:

Prerequisites: Must be Sun Certified Programmer for the Java Platform (any edition)



So yes, you have to be a SCJP before you can try to get the SCJD. But if you have Java-experience and you get a good book (Kathy Sierra & Bert Bates one for example, that's the one i used for both my scjp-certs), the SCJP is an "easy" to get certification, the SCJD is a whole lot harder

Good luck!
Kind regards,
Roel

I am recently out of school and starting to think about getting certified. Is an SCJP a prerequisite of SCJD? Given the current downturn, I am thinking that chances of landing entry-level programming work on an SCJP are rather slim. Am I right? Or looking in the wrong places?. ~2 yrs experience writing small games and other applications in Java and .NET languages. cheers