Which method is used to find that the object is exited or
not?
Answer Posted / ashokmail
we can check the null status of the object for it is
exits or not.
For Example
class java{
public java(){
}
}
class javause{
private java j;
public javause(){
if ( j != null)
j = new java();
}
public static void main(String args[]){
new javause();
}
}
| Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
Why parameters should be passed by reference?
Explain how to convert any java object into byte array.
What is :: operator in java?
Explain what access modifiers can be used for methods?
Does variable declaration allocate memory?
Can we declare a class as abstract without having any abstract method?
Can we extend singleton class in java?
What are the two environment variables that must be set in order to run any java programs?
When should a function throw an exception?
what is difference between equals and ==?
Why is multithreading important?
How can you read content from file in java?
What is a values collection view ?
Why can't we use static class instead of singleton?
What are thread safe functions?