Why sleep()is in Thread and wait() in Object class? Why can't I have both in one class or vice versa?
1 6023This 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 6069what 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 5881how a marker interface gets its functionality and when we implements a marker interface how it got invoked
3 11795how to handle a singleton service locator. when multiple threads are trying to get the singleton object in same time
4 11082Every 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 4790There 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 6256Is it possible to create object with out its default constructor? if possible how? else not possible? justify
5 8016
What is garbage collector?
How do you avoid global variables?
What is the purpose of assert keyword used in jdk1.4.x?
Why is stringbuffer not immutable?
What is final?
When does an object becomes eligible for garbage collection in java?
What is meant by binding in rmi?
Is 0 true or is 1 true?
What is a package in java? List down various advantages of packages.
What is the tradeoff between using an unordered array versus an ordered array?
When do we need to use internal iteration? When do we need to use external iteration?
What is included in core java?
How will you call an Applet using Java Script Function?
What is static class
What is map and hashmap in java?