Why sleep()is in Thread and wait() in Object class? Why can't I have both in one class or vice versa?
1 6117This is related to threads. I have a class with synchronized method m1(). Can I create different instances of this class and execute the m1() for different threads?
3 6195what is the output??????? public class multireturn { public(int assign x ( int x) { if(4==x) { return 7; } else if (7=x+3) { return 6; } return 5; } }
TCS,
3 6011how a marker interface gets its functionality and when we implements a marker interface how it got invoked
3 11976how to handle a singleton service locator. when multiple threads are trying to get the singleton object in same time
4 11237Every class extends object but why it is not possible for every object to invoke clone() method. ideally protected methods should be accessible from sub classes. isn't it?
2 4909There are 2 different ways to create an object. a)By using keyword "new" b)By using Class.forName ("className").newInstance(); What is the difference between these 2 methods.
3 6373Is it possible to create object with out its default constructor? if possible how? else not possible? justify
5 8267
What are inbuilt functions?
In which language java is written?
What is the this keyword?
What are some alternatives to inheritance?
What is a void in java?
What is sorting in java?
Can we define constructor in inner class?
What is try-with-resources in java?
What is the static import?
What are the main concepts of oops in java?
If try block is successfully executed, Then Is Finally block executed?
How does callback work in java?
What does those terms actually mean included in the j.d.k i.6?
What is a treeset class?
What is Classloader in Java?