what is default constructor and parameterised constructor
with example?
Answer / tushar
Default constructor: this constructor is created by the compiler automatically whenever an object is created.User don't have to write default constructor every class has its default constructor
Parameterized constructor: this constructor is exclusively written by the coder to assign the initial value to an instance variable.By creating parameterized constructor you can overwrite the default constructor.
Is This Answer Correct ? | 1 Yes | 0 No |
How many bits is a float?
wat is class level lock and object level lock
how to print the below in java?thanks in advance.... * * * * * * * *
what is the use of StringBuffer?
Nested classes VS Inner classes?
Explain the difference between an object-oriented programming language and object-based programming language?
What is a dot notation?
write a class to input 2 points by the user & check the line maked by the points is horizontal,vertical or rectangle?
Why is java so popular?
What is the default access specifier for variables and methods of a class?
Explain the public class modifier?
What is finalize() function in java?