Java基础,类与对象,public class Student{ public static void main(String[] args) { //定义属性 public String name="骐程"; public int score; //定义方法 public void study(Course c) { score+=c.score; System.out.println("c.score"); } } }