public class Person void speakHello Systemoutprint您好很高兴认识您;Systemoutprintln nice to meet you; class Test public static void mainString args Person zhang = new Person;zhangspeakHello; 编译上述源文件将生成几个字节码文件
编译上述源文件将生成两个字节码文件。其中一个是Person.class,另一个是Test.class。
原文地址: http://www.cveoy.top/t/topic/jdI4 著作权归作者所有。请勿转载和采集!