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 4682There 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 7791
Convert a BST into a DLL and DLL to BST in place.
What is set and get methods in java?
What is a superclass?
What is the difference between method and means?
How do you detect memory leaks?
What is the purpose of checked and unchecked exceptions in JAVA?
How to add menushortcut to menu item?
Why multiple inheritance is not supported by java?
What is native method in java?
Do we need to manually write Copy Constructor?
What are synchronized methods ?
How do you add spaces in java?
What is meant by inheritance and what are its advantages?
Which of the following classes will have more memory allocated?
What do you mean by boolean?