mahamad ismail.a.g


{ City } banglore
< Country > india
* Profession * software engineer
User No # 26754
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 7
Users Marked my Answers as Wrong # 4
Questions / { mahamad ismail.a.g }
Questions Answers Category Views Company eMail




Answers / { mahamad ismail.a.g }

Question { Sun Microsystems, 11727 }

In which way does a Primitive data type is passed ?


Answer

Primitive data types will passed be "Pass by Value"...!!!

Is This Answer Correct ?    0 Yes 1 No

Question { 5268 }

Why sleep()is in Thread and wait() in Object class? Why can't
I have both in one class or vice versa?


Answer

In Java "Object" class is super for all classes and every
entity we consider as object in java. Every object in java
has default behaviour of "Object" class.

Now come to the point, When you instantiate a thread you
may require to stop a while that particular thread.So
Thread class has sleep method.

But in the situation of multithreading, you may require wait
() and notify() methods so that you can invoke "Object"
class behavior to your class.

Is This Answer Correct ?    7 Yes 3 No