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 |
What is the difference between Array and Hash Table?
abstract class A{ int list []=new int [100]; A(int x,int y){ rondom n=new rondom(); for (int i==;i<100;i++); list [i]=x+r.next int(y-x+1); abstract sort (); abstract binary sarch(int temp); class B extends A{
What are the different types of methodologies?
Can we override the overloaded method?
What is bean? Where it can be used?
Is set ordered?
Difference between process and thread?
What is static and a non-static inner class?
Can we create a constructor in abstract class?
In case of inheritance what is the execution order of constructor and destructor?
What is preparedstatement in java?
What is static method with example?