首页 > IT职业 > IT生活 > 20161020方法包即工具类的编辑和调用即开源
package cat;
public class cat {
public void print() {
System.out.println("Hello World");
}
public static void main(String[] args)
{
//在 main 方法中调用 print 方法
cat test=new cat();
test.print();
} }
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3500/viewspace-2798115/ ,如需转载,请注明出处,否则将追究法律责任。