- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
SCJP考试题集
1. Which of the following range of short is correct? A. -27 -- 27-1 B. 0 -- 216-1 C. ?215 -- 215-1 D. ?231 -- 231-1 翻译 下面哪些是short型的取值范围。 答案 C 解析 短整型的数据类型的长度是16 bits,有符号。另外需要说明的是java中所有的整(Integral)数(包括byte,short,int,long)全是有符号的。 2. Which declarations of identifiers are legal? A. $persons B. TwoUsers C. *point D. this E. _endline 翻译 下面哪些是合法的标识符。 答案 A,B,E 解析 Java的标识符可以以一个Unicode字符,下滑线(_),美元符($)开始,后续字符可以是前面的符号和数字,没有长度限制,大小写敏感,不能是保留字。 3. Which statement of assigning a long type variable to a hexadecimal value is correct? A. long number = 345L; B. long number = 0345; C. long number = 0345L; D. long number = 0x345L 翻译 哪些是将一个十六进制值赋值给一个long型变量。 答案 D 解析 十六进制数以0x开头,long型数以L(大小写均可,一般使用大写,因为小写的l和数字1不易区分)。 4.Which of the following fragments might cause errors? A. String s = Gone with the wind; String t = good ; String k = s + t; B. String s = Gone with the wind; String t; t = s[3] + one; C. String s = Gone with the wind; String standard = s.toUpperCase(); D. String s = home directory; String t = s - directory; 翻译 下面的哪些程序片断可能导致错误。 答案B,D 解析 A:String类型可以直接使用+进行连接运算。 B:String是一种Object,而不是简单的字符数组,不能使用下标运算符取其值的某个元素,错误。 C:toUpperCase()方法是String对象的一个方法,作用是将字符串的内容全部转换为大写并返回转换后的结果(String类型)。 D:String类型不能进行减(-)运算,错误。5. Which are syntactically valid statement at// point x? class Person { private int a; public int change(int m){ return m; } } public class Teacher extends Person { public int b; public static void main(String arg[]){ Person p = new Person(); Teacher t = new Teacher(); int i; // point x } } A. i = m; B. i = b; C. i = p.a; D. i = p.change(30); E. i = t.b. 翻译 在// point x处的哪些申明是句法上合法的。 答案D,E 解析 A:m没有被申明过,不能使用。 B:虽然b是类Teacher的public成员变量,但是在静态方法中不能使用类中的非静态成员。 C:a是类Person的private成员,在类外不能直接引用。 D:change(int m)方法是public方法,并且返回一个int型值,可以通过类的实例变量p引用并赋值给一个int型变量。 E:b是类Teacher的public成员变量,且是int型,可以通过类的实例变量t引用并赋值给一个int型变量。 6. Which layout manager is used when the frame is resized the buttons′s position in the Frame might b
您可能关注的文档
- MATLAB在QUAL水质模型计算中的应用.pdf
- MatLab在中学数学教学中的应用.doc
- MATLAB在有限差分法中的应用_熊彬.pdf
- MATLAB实验参考答案.doc
- MATLAB环境下的串口通信软件.pdf
- MATLAB算法求解微分方程数值解和解析解.ppt
- MATLAB编程在FDTD算法中的应用.pdf
- MATLAB软件在地球化学数据处理中的应用.pdf
- Matrix Elements between Nuclear Compound States and Dynamical Enhancement of the Weak Inter.pdf
- MaxwellBoltzmann分布函数的推导.doc
- Search for a Higgs Boson Decaying into Two Photons at LEP.pdf
- Search for a possible spacetime correlation between high energy neutrinos and gammaray bu.pdf
- Search for a Ridge Structure Origin with Shower Broadening and Jet Quenching.pdf
- Search for Baryonic Resonances Decaying to Xi pi in DeepInelastic Scattering at HERA.pdf
- Search for Baryonic Resonances Decaying to Xi ssin DeepInelastic Scattering at HERA.pdf
- Search for charged Higgs decays of the top quark using hadronic tau decays.pdf
- Search for compositeness and leptophobic gauge bosons (with polarized beams).pdf
- Search for Correlations between Nearby AGNs and Ultrahigh Energy Cosmic Rays.pdf
- Search for Cosmic Axions using an Optical Interferometer.pdf
- Search for Doublycharged Higgs Boson Production in the Decay H++H mu+mu+mumu with th.pdf
文档评论(0)