Vijay Pawar

Greenhorn
+ Follow
since Sep 04, 2003
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 Vijay Pawar



This prints "hello" and does not print "world"

But we put the print() method in class B then it prints "world"



Can someone explain this behaviour
Dear K&B book lovers,

Referring to page no 15, exam Watch,

char a = 0x892; // octal literal

Isnt this a hex literal ?

Thanks
Vijay
Hello All,
If we clear the IBM 484 exam, will i receive the JCert certificate or will IBM send me a hard copy of a certificate with IBM Logo ?
Thanks
Jughead
Hi all,
A static synchronized method synchronized on the Class object.

is equivalent to

My question is that Can we synchronize on any arbitrary Class object
is the below code valid:

Thanks
Jughead
Hi Prashant,
I faced the same problem and here is the solution.
Change the method name getAdvice() to sayAdvice() in the remote interface, and the bean class.
In the client call the method sayAdvice() instead of getAdvice().
By the way, did u clear scjp 1.2 or 1.4 ? what books/sites did u use ?
Bye
Jughead
Hi all,
Referring to page 363 of Java Certification - 2nd edition by Khalid Mughal,

A subclass decides wheather the new defination of an inherited synchronized method will remain synchronized in the subclass.


Does this mean that the inherited method in the subclass is automatically synchronized or one has to explicity declare it as synchronized ?
Can someone eloborate on this !
Thanks
Jughead
When we pass the string object to any method and do any modification , the original string does not change.

This will print :
Hello world
Hello world

The above code completes the ChildThread even if the main method completes earlier. The program ends only when the ChildThread completes its run method. Here the ChildThread created is a user thread.
If we call t.setDaemon(true) before calling t.start then the ouptput is :
C:\test>java ThreadTest
This is main thread
now ending main
Child Thread: 1
This means that the child thread does not complete the run method and is killed when the main method terminates.

In the above example, t is a daemon thread and t1 is a user thread. Even if main method completes, since t1 is a user thread it will continue to execute. Hence in this case the daemon thread t will not be killed. The daemon thread is killed by the JVM only if its parent thread is killed. The killing is invoked by the completion of parent thread. But since the user thread t1 is alive, the parent main thread will remain alive ( program will not terminate ) till the user thread completes.

In this example the UserThread counts upto 20 but the Daemon Thread counts only upto 10 and then by this time the User thread has completed ( 500 ms sleep time) and also the main thread has completed, hence now there are no more user thread alive and hence the daemon will be killed forcefully by the JVM.
During deployment if your click on "Generate client side jar file" then the deploy tool generated the stubs required at the client side and are packaged in a jar file.
If you are using HFE then it is AdviceAppClient.jar file
cheers
Jug
Dear All,
I am a bit confused about the market value of the various certification available.
These days server vendors like weblogic and websphere are offering j2ee certification examinations.
I would like to start this thread to discuss the importance of SCBCD certification over the other j2ee certifications.
I am confused which certification will help me make more bucks and increase my market value ? Hope the same would be in them minds of many aspiring j2ee developers.
Hoping that this thread will finally help me and many of us to make up our minds on which certification to take up.
Thanks and lets start debating !
Jughead
Congrats ,
would u like to share your study methodology ?
which mock exams and books did u use ?
thanks
16 years ago
Can u host it somewhere else ?
Dear shrini,
The rule is :
Operand 1 + Operand 2
If Operand 1 is a String then + will behave as concatination operator
and result will be a String
"To JAVA:" + h1 == h2 will be executed as
"To Java: hello" == h2
and the result u know is false
Bye
Jughead
You need to do four things:
1. Install jdk1.4 and practice as many programs as u can.
2. Read Khalid mugal and K&B
3. Practice mock exams.
4. PRAY that u get good marks :0)
TATA
Jughead