1.Can we define method with same name of class?
Yes
No
Wrong
Correct
We can define a method name as class name then there will not be any no compile time error or run time errors.We can define any name as method name. But as per coding standards of java it is not recommended to use class name as method name
2.What happens if we add return type to constructor?
Compile time error
Run time Error
JVM treats that as method
Wrong
Correct
Constructor does not have return type. if we add any return type then it will become a normal method. JVM treats that as method
3.We can declare constructor as private?
True
False
Wrong
Correct
We can declare constructor as private.Usage: In order to restrict object creation outside of class we should define constructor as private
4.What is default accessibility modifier of a default constructor
public
private
Same as class accessibility modifier
default
Wrong
Correct
When default constructor is created the its accessibility modifier will be assigned as same as class accessibility modifier