类Student的声明如下: package com.school class Student{ String name; int age; Student(String name,int age){ //code } void study(String subject){ / /code } } 正确调用方法study(String subject)的是哪项?()
- A、Student stu = new Student(“Tom”,23); stu.study(“数学”);
- B、Student.study(“数学”);
- C、Student stu = new Student(“Tom”,23); stu.study();
- D、Student stu = new Student(“Tom”,23); String result=stu.study(“数学”);
正确答案:A
答案解析:有
微信扫一扫手机做题