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 use of callablestatement?

582


Can we override compareto method?

510


when should you use stringbuilder class in a program?

528


What is nested top-level class?

583


What is the use of inner class?

552






Can we sort hashmap in java?

534


What is the difference between Grid and Gridbaglayout?

588


How does remove work in java?

526


What is finally and finalize in java?

602


What is class and its types?

546


how to run ecllipse with jettyserver for windows environment using batch file

1502


Can we write a class without main method in java?

487


What is an example of declaration?

531


What is finally in Java?

584


How do you reverse a string in java without using string buffer?

595