Explain constructors and types of constructors in java.
Answer / Tripti Verma
A constructor is a special method that is used to initialize an object. When a new object is created, the constructor executes before any other methods are called. Java has two types of constructors: default constructor (no-arg constructor) which is automatically generated by the compiler if not defined explicitly, and parameterized constructor which can take arguments.
| Is This Answer Correct ? | 0 Yes | 0 No |
Write the code for Palindrome ?
How is garbage collection controlled?
String is mutable or immutable?
what is run time polymorphism
What is the difference between jdk, jre, and jvm?
What is the use of flag?
What are accessor methods in java?
What is singleton class in java and how can we make a class singleton?
Write a program to show whether a graph is a tree or not using adjacency matrix.
Explain what pure virtual function is?
Is list ordered in java?
Can we override the static method?