欢迎来到求知题库网 求知题库官网
logo
全部科目 > Java认证考试 > Java认证考试综合练习

单项选择题

类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(“数学”);

点击查看答案&解析
微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题