can we create object for static class in java
Answer Posted / usha
Hi all, If u want to create a static class then no need to
create instance for the class.If u create a instance then
there is no purpose to create that class as static.As in
case of static members & static methods , we are not
creating instance, just we are calling those by using class
name only.
| Is This Answer Correct ? | 54 Yes | 6 No |
Post New Answer View All Answers
Which list does not allow duplicates in java?
What is a default method?
What is string substring?
What is extension method in java?
How do you declare an array in java?
Can we declare a constructor as final?
Can we have multiple classes in single file ?
Can constructor be inherited?
What is the escape character in java?
What is difference overloading and overriding?
Discuss different types of errors that generally occur while programming.
What is the difference between class & structure?
Explain java heap space and garbage collection?
What are default methods ?
What happens to the Exception object after handling an exception?