what is the constructor and how many types of constructors are used in java?



what is the constructor and how many types of constructors are used in java?..

Answer / Sakshi Upadhyay

A constructor is a special method that is used to create and initialize objects in Java. There are two types of constructors: default constructor (no arguments) and user-defined constructor (with arguments).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is a stack class in java ?

1 Answers   Akamai Technologies,


What happens if we override only equals?

1 Answers  


What is an example of character?

1 Answers  


What is a protected method?

1 Answers  


What is the difference between yielding and sleeping in java programming?

1 Answers  


What is a parameter used for?

1 Answers  


What is the vector class in java programming?

1 Answers  


What is the use of StringTokenizer class?

1 Answers   Hexaware, Virtusa,


What are recursive functions?

1 Answers  


What are library required to connect to excel sheet.

2 Answers   Cap Gemini,


What is the importance of static variable?

1 Answers  


Write a java program to get a string of words and print the numbers of each word count in descending order

11 Answers   Logica CMG, Subex,


Categories