对于下列Tom类,哪个叙述是正确的? public class Test{ public static void main(String args[]){ Tom cat = new Tom(); } } class Tom{ void Tom(){ System.out.println("ok"); } Tom(){ System.out.println("你好"); }
A.
程序运行时输出:ok
B.
有两个构造方法
C.
有编译错误
D.
程序运行时输出:你好
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【简答题】Peter: Hi Tom. I would like to introduce a fiend to you. This is Rick. Rick, this Tom. Tom: Nice to meet you, Rick! Rick: Nice to meet you, too! Peter: Rick is from Australia. This is his first trip t...
【简答题】Peter: Hi, Tom. I would like to introduce a friend to you. This is Rick. Rick, this is Tom. Tom: Nice to meet you, Rick! Rick: Nice to meet you, too! Peter: Rick is from Australia. This is his ...
【简答题】A.Because people are curious about the news. B.Because people are exposed to differing views. C.Because it is a fashion to do so. D.Because it is easy for people to take care of each other.
【简答题】A.Because people are curious about the news. B.Because people are exposed to differing views. C.Because it is a fashion to do so. D.Because it is easy for people to take care of each other.