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

Explain the different forms of polymorphism?

774


What is derived datatype?

884


What is null in java?

707


What is the flag in java?

800


What is difference between filereader and bufferedreader?

723


What does the three dot emoji mean?

820


What is the properties class?

824


How to connect to a remote database using Applet?

2253


Is java free for commercial?

669


How do you decide when to use arraylist and linkedlist?

748


What is difference overloading and overriding?

813


Is heap stored in ram?

718


Garbage collection in java?

785


Can a static block throw exception?

862


What is a void method?

704