waht happens when a return type ,even void is specified for
a constructor?

Answer Posted / krishna kumar g.

Answer 2 is exactly correcr.I have done practiclly.No
compile time errors.
Code will run and executes sucessfully.But it treats as
method not as constructor.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data type example?

541


Can we print null in java?

561


Can inner class extend any class?

590


What is sortedset in java?

562


What is the difference between a break statement and a continue statement?

587






Can subclass overriding method declare an exception if parent class method doesn't throw an exception?

498


Name few java 8 annotations ?

554


Can a constructor be protected?

524


what is ststic with example

1585


Add a value x to array from index l to r where 0 <= l <= r <= n-1

614


What is encapsulation in java?

612


What is a ?

743


Which is better list or arraylist in java?

485


Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?

568


What is treeset and treemap in java?

566