//Where className is the name of the class and Method is the name of the non static method.
public static void main (String args){className objectVariable = new className();objectVariable.Method();}
//Now preferring the below;
public static void main (String args){className instance = new className();instance.Method();}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.