What do u mean by method and also contructer in java ?

Answer Posted / javachi

A method is a procedure to call the objects with their properties within or outside the classes, method is considered in object oriented programming as functions in structured programming.

constructor is a method used only for initializing the variables of the object class. this will reduce the code compatibility.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the final class?

762


What is the size of boolean variable?

842


What is singleton class example?

814


What modifiers may be used with a top-level class?

803


Can a class have an interface?

766


What is appletviewer?

821


Explain illegalmonitorstateexception and when it will be thrown?

860


How long will it take to learn java?

763


What is jvm? Why is java called the platform independent programming language?

791


What is a data structure java?

779


What is the byte order of byte buffer?

802


Is it possible to override private or static method in java?

778


What is difference between wait and notify in java?

822


What do you mean by flow of struts?

1025


What is public static?

767