Gurukeerthi Gurunathan

+ Follow
since Jun 10, 2003
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 Gurukeerthi Gurunathan

Thanks Stan - that's what I thought. In Approach 1 where I have two objects how does the control flow? Let's say I have that code in the main method of a class called MainClass. After I do the t1.start(), does the main thread returns immdtly to the next line t2.start() without waiting for the t1's run method to finish? Assuming I have no code to share between them and I am taking approach 1, if main method doesn't wait on the t1's thread to finish and goes to the next line, it'll look like multi threading to me...


Assume a class

Can someone clarify the difference(if any) between these two approaches in multi threading? Which one is indeed multithreading?

Approach 1. I instantiate two objects

Approach 1. I instantiate one object
I am sorry, am lost in the explanation that Marlene gave. Can someone please make it simpler?
Another observation after reading Geeta's posting. A static method CANNOT be overridden by a non-static method (aka instance method). An instance method of a superclass cannot be hidden by a static method of the subclass.
Technically static methods can be overridden. My understanding is that overriding facilitates two functionalities and I don't know if we call a method to be overridden if and only if these two clauses are satisfied.
1. dynamic method lookup
In this case, static methods will not use the dynamic method lookup. We can say,
Superclass sc = new Childclass();
where overRiddenMethod() is a static method in both super and child classes, and jre will execute the super class' static method instead, i.e. not performing the dynamic lookup.
2. providing a new functionality for the child class while hiding the superclass functionality.
If you say,
ChildClass cc = new Childclass();
( ideally we shud be doing ChildClass.overRiddenMethod() as it's a static method, but for simplicity I am using this snippet)
In this case, the overriddenmethod of the child class is called.
I thought suspension of a thread means suspending the current thread under execution while allowing other thread/threads to execute or have the control during the suspension time and after the sleep or suspension period is over, the first thread may or may not gain control.But your definition of "suspension of a thread" states that suspension is suspending other threads from taking control, which is different from what I thought.
Correct me if I am wrong.
Is that the 'Self-Tests' section in K&B that you are talking about, when you say 'test in K&B'.
For Lalitha's example to work, we need an explicit cast, but at the same time an assignment like,
byte b = 127;
will perfectly compile. I think there is a difference between passing a value as a method argument and assigning. Even this will work,
byte b = (int)127;
Why is that so?
Hi Deep,
Can you also tell us how long(days or months) were you preparing for this? I understand that the time to learn depends on individual's ability.
You should inform the customers of the browser version(by disclaimer or product release note or a message in the web page) that will be supported by your application. IE 6.0 or later should have the updated JVMs.
18 years ago