C公共类资源安
大家都能去访问的类,可以通过该类的实例化对象进行一系列操作。比如public class Student{...},我在其他类中需要用到Student类中的一些方法时,我可以先实例化一个Student类的对象,Student student1 = new Student(); 然后通过 实例化对象.方法名 既student1.方法名 去进行调用。
大家都能去访问的类,可以通过该类的实例化对象进行一系列操作。比如public class Student{...},我在其他类中需要用到Student类中的一些方法时,我可以先实例化一个Student类的对象,Student student1 = new Student(); 然后通过 实例化对象.方法名 既student1.方法名 去进行调用。