Interview Questions and Answers for 'Tribro' | Search Interview Question - javasearch.buggybread.com
Questions
Search
List By Company
List By Topic
Legacy
Tests
Repository
DashBoard
Java
Java 8
Java 7
Java Abbreviations
OCJP / SCJP
Class List
New in Java 8
Java Exceptions
Spring Exceptions
Java Enums
Java 8 Lambda
Java 8 java.time
Big Data
Best Of Java
Discussion
Search
Subscribe
Search Interview Questions
More than 3000 questions in repository.
There are more than 900 unanswered questions.
Click here
and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company
Label / Company / Text
Search
Submit Question
Interview Questions and Answers for 'Tribro' - 1 question(s) found
- Order By Newest
Q1.
What are constructors and Destructors in Java ?
Core Java
Ans. Constructors are used for initializing the object state once it is initialized and memory has been reserved for it.
Destructor is used to de-allocate memory allocated by objects.
There are no destructors in Java. Alternatively, Java provides Automatic garbage collection i.e automatically releasing the un-referenced memory.
Sample Code for constructor
Help us improve. Please let us know the company, where you were asked this question
:
Like
Discuss
Correct / Improve
 constructors  destructors
Asked in 2 Companies
Correction
Duplicate of Another Question
Company where this question was Asked
Suggestion
Try 1 Question(s) Test
Which of the following is false about Constructors ?
Constructor can be overloaded
A no argument constructor is provided by the compiler if we declare only constructors with arguments.
Constructors shouldn't have any return types , not even void.
If super is not explicitly called, still super() is intrinsically added by the compiler.
Related Questions
Why every object constructor automatically call super() in Object before its own constructors?
Can constructors be synchronized in Java ?
Are constructors inherited? Can a subclass call the parent's class constructor? When?
Which of the following is false about Constructors ?
Which of the following cannot be marked static ?
Can we overload constructors ?
Is it advisable to set the member variables through constructors instead of setting them through setters ?
Why doesn't Java even allow void return types for Constructors ?
What is the use of constructors in Java ?
Help us and Others Improve. Please let us know the questions asked in any of your previous interview.
Any input from you will be highly appreciated and It will unlock the application for 10 more requests.
Company Name:
Questions Asked: