Calling a Method in Java »



Calling a Method in Java : The methods called in java in 2 types
a) Create an object to the class to which the method belongs
syntax:

Classname obj=new Classname();
ForEx : First is a java program
then we can create and object to that class as follows:
First f=new First();
Here ‘f’ is the object of the class [...]