What is constructor

Answer Posted / diya

constructor is a special function whose task is to
initialise the object.the name of the constructor is as
same as the class.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many digits can a float hold?

535


What is the difference amongst jvm spec, jvm implementation, jvm runtime ?

502


Which is faster call by value or call by reference?

497


Describe method overriding

580


Explain about wait() method?

564






Why does java not support operator overloading?

658


What access modifiers can be used for methods?

555


What is a package in java? List down various advantages of packages.

748


Can a class have multiple superclasses?

564


What are alternatives to java serialization?

599


How do you format in java?

545


How we can skip finally block of exception even if some exception occurs in the exception block in java?

516


What is the use of arraylist in java?

522


how to create multithreaded program? : Java thread

501


What is a class reference?

550