In what circumstances, compiler will supply a default
constructor for a class?
Answer Posted / vijayakumar chinnasamy
If there is no constructor in the class , then the compiler
create a default constructor with access specifier of class.
class A{ } - compiler create default constructor for this
class.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is singleton class and how can we make a class singleton?
Can we inherit a class with private constructor?
What are adapter classes?
What are the main differences between the java platform and other platforms?
Difference between Linked list and Queue?
What is sortedmap in java?
What is void class in java?
Which is a valid identifier?
why java uses class level type casting ?
What is ‘has a’’ relationship in java?
How is it possible for two string objects with identical values not to be equal under the == operator?
How can you read an integer value from the keyword when the application is runtime in java? example?
What should I import for arraylist in java?
What is the purpose of format function?
What is method overriding in java ?