Rachil Chandran

Ranch Hand
+ Follow
since Mar 05, 2006
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 Rachil Chandran

Passed the SCJP 2 with 96% today.

Got 2 questions wrong (which should have been 96.7%, dont know why sun takes the floor instead of ceil).

One as I expected, in threads and the other in java.lang.package . Am sure have made some very silly mistake.

Materials used:
-K&B and a few pages from Khalid Mughal (didn't have enough time)
-Marcus' exams (it's uncanny how close your actual score is to these)
-Dan's exams

Would like to thank everybody who posts in the forums. Each post you read, you either learn something new or refresh your knowledge of some topic.

A BIG thank you to Kathy and Bert for their book. Have bought three other books from the same authors and series since I started preparing for SCJP.

Thinking of changing my signature to Bert Rocks!! (yes, biodiesel rocks too)
16 years ago
Thanks Keith and Chandra.

I got a bit confused because I was thinking in terms of a normal object.

For instance, if myObj is an instance and has an attribute 'a', changing the value of a through a passed reference

void method(MyObj o){
o.a = 10;
}
would actually change it in the myObj (method(myObj)).

The question I asked was more like rassigning o to some other instance. Don't know what I am to do in the actual exam if i make silly mistakes like these.

Thanks a lot for your replies.
Given this program, the output is to be determined



The answer is given as:

Local New Instance (I tried running the program and verified this is right).

My question is, shouldn't the "Local" change to "Local Add" after the call to method()?

Thanks in advance
[ April 09, 2007: Message edited by: Rachil Chandran ]
I read in the K&B book that protected members, when inherited become private to the inheriting class.

I have the following three classes:



In the above code, 'x' is protected so when BDiff inherits it, it becomes private to BDiff.

The how is it possible that I am able to inherit 'x' again in BDiffChild.

Might be missing something fundamental but am a bit consfused.
Eclipse (with the Dali plugin ofcourse) does help you generate entities automatically. The project should already have a schema associated with it to do this.

This approach automatically generated basic annotations and had default names for the entity and it's fields. I used the persistence properties panel to set specific properties.

'EJB 3 in Action' mentions that using a mapping file is advantageous over annotations in that the mapping is seperated from the code.

Are there any tools that help you do this i.e. generate a mapping file automatically (couldn't figure how to get this done in eclipse)?
[ March 15, 2007: Message edited by: Rachil Chandran ]
Do you have doubt about an answer to a specific question here or are you looking for answers to these questions?
Static code is executed (once) when the class is loaded into the JVM
Think about it. You are not calling go() from a static context, you are calling go() in bm instance's context
Good score. Congrats
17 years ago
100% Great!! Congrats
17 years ago
I want to automate a process wherein I replace the occurences of the word "xyz" with "abc" and then launch a process.

I can cook a PERL script quickly to do this. I am not worried about runtime errors (actually Perl has a pre-compiler so I needn't worry anyway) because I am going to test this now and make sure it works.

In my experience scripting languages are used a lot in these small utility/automation programs. Imagine doing the same thing in C.

17 years ago
try

set classpath = c:/java/scjp;%CLASSPATH%

and then,

java cert.testdefault