{ //some code }
class myclass{ protected void mymethod(variable v) { //the operation to be performed is written here } } class submethod{ void mymethod(variable v) { //the operation to be performed is written here } }
Class myclass { Private void mymethod(variable v) { //body of the method } }
public class human { private int height=180; //in cm }
Public void add(int a,int b) { }