why the constructor should be used in class,if there is no
constructor what will happen?
Answer Posted / ravikiran
constructor is used to initialize the variables during the
creation of instances.
If there is no constuctor no object will be gets created.
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is flush () in java?
What is a parameter in java?
how to open and edit XML file in Weblogic???
Explain the difference between map and flatmap stream operation?
List two java ide’s?
Why 1 is not a prime number?
Write a program to print 15 random numbers using foreach of java 8?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread
what methods would you overwrite in java.lang.object class?
How does queue work in java?
What is java basic concept?
What does the “final” keyword mean in front of a variable? A method? A class?
What is a layout manager and what are different types of layout managers available in java awt?
Explain how can you debug the Java code?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?