Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Differentiate constructor and a method and how are it be
used?

Answer Posted / teju

constructor: It is one special member function.it has name same like class .it does not have any return type.it gets executed when we create an object of class and invokes implicitly. constructor is used to initialize the variables ,start the thread

method:
it gets executed explicitly when object is created . it has return type .
method is used to invoke the task or block of code

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many threads can I run java?

1117


What is the relationship difference the canvas class and the graphics class?

1060


What do you understand by soft reference?

1056


Define how does a try statement determine which catch clause should be used to handle an exception?

1162


What is string pooling concept?

1074


Is linkedlist thread safe in java?

997


Differentiate jar and war files?

1040


What are the different types of java?

1067


What are the access modifiers available in java?

1132


Is special character in java?

1095


What is port number in java?

1041


Will the compiler creates a default constructor if I have a parameterized constructor in the class?

1113


What are the major advantages of internal iteration over external iteration?

1045


Does constructor return any value?

1025


What are java annotations?

1158