This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.

sharmistha mohapatra

Greenhorn
+ Follow
since Dec 12, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by sharmistha mohapatra

The api says its deprecated.

stop()
Deprecated. This method is inherently unsafe. Stopping a thread with Thread.stop causes it to unlock all of the monitors that it has locked (as a natural consequence of the unchecked ThreadDeath exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects become visible to other threads, potentially resulting in arbitrary behavior. Many uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), the interrupt method should be used to interrupt the wait. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.




Hi,

I wanted to know if stop() in jdk1.5 is deprecated,as i came across about it in the jdk1.5docs..

and is there any alternate method for the above???or its no more required ???

Regards,
Sharmistha
Thanks for the clarification....i shouldnt miss my constructor question although
I am so sorry.Instead of writing method...I wrote it as Constructor.Got confused while I was going through a constructor link.

But the second code doesnt give an exception,rather its giving the output as "String".


Thanks for the correction.
Yes,I tried that out.It gave a compiler error.But in case of the below code it results in output as "String"

public class Test1{
static void method(Object obj){
System.out.println("Object");
}
static void method(String str){
System.out.println("String");
}
public static void main(String args[]){
method(null);
}
}

what makes the difference in both the codes and how does a constructor make a choice of calling which method???
hi,

How can it be determined which constructor is invoked?



Yeah,that indeed was a good example...I got it now.

Thankyou so much for clearing the confusion.
Is it possible to have the overriden method in the same class???
Hi,

I know that overloading is when we have a different argument list with same name,return types methods whereas overriding is when we have same name,return types,arg list but different body implementations.

Kindly correct me if i am wrong.

Regards,
Sharmistha
I apologize for the mislead subject name and take it to keep it in mind.

Thanks for the reply.
Hi,

I read in a question's explanation these lines below
"If a final variable is a reference to an object,we can modify that object's data members

while the program is running."

Anybody kindly explain me the meaning of this line and also scenarios where this is applicable.

Regards,
Sharmistha
Hi,

I want to run few simulators for mock exams,but unfortunately i have a vista OS which bars many mock exam .exe's.and also i tried to download JDK1.5 to configure, in vain.

Any idea about jdk running in vista based pc's,please inform.Otherwise i'll have to search for loading another OS which would take much of my preparation time .

Thanks & Regards,
Sharmistha

Hi,

I have just started to prepare for SCJP and appeared for the practice exam to know my weak points.
I could only earn 20% i.e.,only 15 answers were correct out of 72 .

I have planned for the certification next month.Kindly let me know how much effort should I be giving so that i can secure a good percentage . And also any fast way to grab everything because i could see not so familiar questions also.

Regards,
Sharmistha
Hi,

I am trying to find out the Devakas Practice exams and unable as of now.

If anyone can help me in finding it,Kindly pass me on the info.


Thanks & Regards,
Sharmistha
Thanks for the reply!!!

But still under confusion,as where does this invertion come into action...
If i replace the number in the code to 5 or 6 or 7,the output gives a +1 to the number with a negative sign.

For eg: if i replace it with say 6 now...
I get the output as -7
15 years ago