[java 将日期转化为格林时间]JAVA题库:格林模拟试题二(下)(6)
【shitiku.jxxyjl.com--JAVA认证试题集锦】
question 48)given the following variables
char c = "c";int i = 10;double d = 10;long l = 1;string s = "hello";
which of the following will compile without error?
1)c=c+i;
2)s+=i;
3)i+=s;
4)c+=s;
question 49)
which of the following will compile without error?
1) file f = new file("/","autoexec.bat");
2) datainputstream d = new datainputstream(system.in);
3) outputstreamwriter o = new outputstreamwriter(system.out);
4) randomaccessfile r = new randomaccessfile("outfile");
question 50)
given the folowing classes which of the following will compile without error?
interface iface{}class cface implements iface{}class base{}public class obref extends base{ public static void main(string argv[]){ obref ob = new obref(); base b = new base(); object o1 = new object(); iface o2 = new cface(); }}
1)o1=o2;
2)b=ob;
3)ob=b;
4)o1=b;
question 51)
given the following code what will be the output?
class valhold{ public int i = 10;}public class obparm{public static void main(string argv[]){ obparm o = new obparm(); o.amethod(); } public void amethod(){ int i = 99; valhold v = new valhold(); v.i=30; another(v,i); system.out.print( v.i ); }//end of amethod public void another(valhold v, int i){ i=0; v.i = 20; valhold vh = new valhold(); v = vh; system.out.print(v.i); system.out.print(i); }//end of another}
1) 10030
2) 20030
3) 209930
4) 10020
本文来源:https://shitiku.jxxyjl.com/javarenzhengshitijijin/6415.html
相关试题
- 【java二级考试历年真题】JAVA认证历年真题:SCJP认证套题解析
- java 将日期转化为格林时间|JAVA题库:格林模拟试题二(上)(1)
- java二级考试历年真题_JAVA认证历年真题:SCJP认证套题解析
- java 将日期转化为格林时间|JAVA题库:格林模拟试题二(下)(3)
- java 将日期转化为格林时间_JAVA题库:格林模拟试题二(下)(1)
- java 将日期转化为格林时间|JAVA题库:格林模拟试题二(下)(2)
- [java 将日期转化为格林时间]JAVA题库:格林模拟试题三(上)(3)
- java二级考试历年真题|JAVA认证历年真题:SCJP认证套题解析
- [sun认证java程序员]SUN认证Java2程序员考试(SCJP) 试题解析(3)
- 【java 将日期转化为格林时间】JAVA题库:格林模拟试题二(下)(4)
-
java二级考试历年真题_JAVA认证历年真题:SCJP认证套题解析详细阅读
41、which of the following statements are legal?a long l = 4990;b int i = 4l;c float f = 1 1;d double d = 34 4;e double t = 0 9f (ade)题目:下面的哪些声明是...
-
java 将日期转化为格林时间|JAVA题库:格林模拟试题二(下)(3)详细阅读
question 36)which of the following are java key words1)double2)switch3)then4)instanceofquestion 37)what will be output by the following line?system ou...
-
java 将日期转化为格林时间_JAVA题库:格林模拟试题二(下)(1)详细阅读
question 31)what will happen when you attempt to compile and run the following codeimport java io *;class base{ public void amethod()throws filenot...
-
java 将日期转化为格林时间|JAVA题库:格林模拟试题二(下)(2)详细阅读
question 33)what will happen when you attempt to compile and run this code demonstration of event handlingimport java awt *;import java awt event *;p...
-
[java 将日期转化为格林时间]JAVA题库:格林模拟试题三(上)(3)详细阅读
question 10)which of the following statements are true?1) a byte can represent between -128 to 1272) a byte can represent between -127 to 1283) a byte...
-
java二级考试历年真题|JAVA认证历年真题: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 解析 短整型的数...
-
[sun认证java程序员]SUN认证Java2程序员考试(SCJP) 试题解析(3)详细阅读
what happens when you try to compile and run the following application? choose all correct options 1 public class z { 2 public static void ma...
-
【java 将日期转化为格林时间】JAVA题库:格林模拟试题二(下)(4)详细阅读
question 40)which of the following statements are correct?1) if multiple listeners are added to a component only events for the last listener added wi...
-
java 将日期转化为格林时间_JAVA题库:格林模拟试题二(上)(2)详细阅读
question 4)what will happen when you attempt to compile and run this code?class base{ abstract public void myfunc(); public void another...
-
java二级考试历年真题|JAVA认证历年真题:SCJP考试真题和解析详细阅读
例题1: choose the three valid identifiers from those listed below a idolikethelongnameclass b $byte c const d _ok e 3_case 解答:a, b, d 点评...