当前位置: 技术问答>java相关
一道SCJP题
来源: 互联网 发布时间:2015-03-27
本文导语: What does element zero of the string array passed to the public static void main method contain? A. The name of the program B. The number of arguments C. The first argument if one is present 这题是什么意思? | ...
What does element zero of the string array passed to the public static void main method contain?
A. The name of the program
B. The number of arguments
C. The first argument if one is present
这题是什么意思?
A. The name of the program
B. The number of arguments
C. The first argument if one is present
这题是什么意思?
|
选C。
这题问你在main(String[] args)方法的那个字符数组args的第0个元素即args[0]代表的是什么。
这题问你在main(String[] args)方法的那个字符数组args的第0个元素即args[0]代表的是什么。
|
意思是在Main()方法中,String[] args 中的args的索引为0的参数是什么?
答案是C;
若有一个数组元素则为除程序名外的第一个参数。
注意:与C 中的main()不同,C 中的main()的参数组的第
0索引为程序名。
在JAVA 中,args.length()方法取参数个数。
给分。
答案是C;
若有一个数组元素则为除程序名外的第一个参数。
注意:与C 中的main()不同,C 中的main()的参数组的第
0索引为程序名。
在JAVA 中,args.length()方法取参数个数。
给分。
|
camry错了,如果是C语言,那才选a
|
哈哈
我也认为是c对呀
我完全同意楼上的意见
我也认为是c对呀
我完全同意楼上的意见
|
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
|
在这个参数上c与java的处理是不相同的,可能刚从c转过来的程序员,有时就会搞混。
|
c
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。