Why sleep()is in Thread and wait() in Object class? Why can't I have both in one class or vice versa?
1 5939This 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 5927what 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 5749how a marker interface gets its functionality and when we implements a marker interface how it got invoked
3 11656how to handle a singleton service locator. when multiple threads are trying to get the singleton object in same time
4 10903Every 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 4681There 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 6139Is it possible to create object with out its default constructor? if possible how? else not possible? justify
5 7788
What is the internal implementation of set in java?
How to check if linked list contains loop in java?
What are recursive functions? Give some examples?
How do you get the length of a string in java?
What is java instanceof operator?
Can a class be declared as protected?
What is integers and example?
Why is java called java?
What is the list interface in java programming?
How do you implement polymorphism in our day to day life?
What is singleton class example?
Why generics are used in java?
What is nullpointerexception in java?
Explain the significance of listiterator.
How to pass arraylist to stored procedure in java?