1. If your class has a main method you can just use it with 'java syz.class'.
2. If your class just contains 'normal' methods you can access its public methods by creating an instance of your class (in another java file) and than you can call the method you want, e.g.:
syz myClass = new syz();
myClass.myMethod();
explanation:
myClass = instance of syz.class
myMethod = any public method of syz.class
if it is in the same directory doing what frag said is fine. things get complicated when you start using packages if you really want to know about using packages have a look at
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.