what is constructer?what are the type of constructer with
example.

Answer Posted / sunil prasad

Constructor is a specail type of mrthod.constructor name
should be same with the class name
There is defferent type of construtor:-
default constructor
parameter constructor
default construtor automatically call when we create
object of class.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a java executable jar file?

658


How do you create a jar file?

697


What is a jpa repository?

658


In an htm form i have a button which makes us to open another page in 15sec.how will you do that?

1554


What's the difference between authentication and authorization? : java security

712


Do I need both jdk and jre?

696


How to reverse the singly linked list(In Node data members are(int data,int pointerTONext))

1509


In system.out.println(), what is system, out and println?

787


What is javacpl?

682


What is the difference between Logical Parallelism and Physical Parallelism?

3170


What are anonymous methods and lambda expression?

610


What is the difference between deep copy and shallow copy in java

753


How can the static main method use instance variables?

700


What is spliterator in java se 8?

797


What do you mean by exception handling?

659