电话:0731-83595998
导航

JAVA模拟题:TestoftheJavaSkill(2)

来源: 2017-12-19 10:41
百度广告

  Question 9: 
// Start For loop 

   public class Lin{ 
Lin l = new Lin(); 
}

   public void amethod(){ 
// Start For loop 
ia[i] = i; 

}

   A. for(int i=0; i

   B. for (int i=0; i

   C. for(int i=0; i< 4; i++)

   D. for(int i=0; i

   Question 10: 
Integer s = new Integer(9); 
Long u = new Long(9); 
A. (s==u)

   B. (s==t)

   C. (s.equals(t))

   D. (s.equals(9))

   E. (s.equals(new Integer(9))

   Question 11: 

   A. Vector v = new Vector(99); 

   B. Vector v = new Vector(); 

   C. Vector v = new Vector(); 

   D. Vector v = new Vector(100); 

   Question 12: 

   class Base{ 
System.out.println("Base.amethod"); 
}

   class Over extends Base{ 
Over o = new Over(); 
o.amethod(iBase); 

   public void amethod(int iOver){ 

   A. Compile time error complaining that Base.amethod is private

   B. Runtime error complaining that Base.amethod is private

   C. Output of Base.amethod

   D. Output of Over.amethod |||

   Question 13: 

   public class MyClass 
amethod(arguments); 

   public void amethod(String arguments) 
System.out.println(arguments[1]); 
}

   A. Error can't make static reference to void amethod

   B. Error method main not correct

   C. Error array must include parameter

   D. Error amethod must be declared with String

   Question 14: 

   A. mid(2,s);

   B. charAt(2);

   C. s.indexOf('v');

   D. indexOf(s,'v');

   Question 15: 

   public class Bground extends Thread{

   public static void main(String argv){ 
b.run(); 
public void start(){ 
System.out.println("Value of i=" + i); 

A. A compile time error indicating that no run method is defined for the Thread class

   B. A run time error indicating that no run method is defined for the Thread class

   C. Clean compile and at run time the values 0 to 9 are printed out

   D. Clean compile but no output at runtime

   Question 16: 

   public class MyClass{ 

   public static void main(String argv){ 

   A. Error Variable i may out have been initialized

   B. null

   C. 1

   D. 0(CN-JAVA) 

编辑推荐:

下载Word文档

温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)

网络课程 新人注册送三重礼

已有 22658 名学员学习以下课程通过考试

网友评论(共0条评论)

请自觉遵守互联网相关政策法规,评论内容只代表网友观点!

最新评论

点击加载更多评论>>

精品课程

更多
10781人学习

免费试听更多

相关推荐
图书更多+
  • 电网书籍
  • 财会书籍
  • 其它工学书籍
拼团课程更多+
  • 电气拼团课程
  • 财会拼团课程
  • 其它工学拼团
热门排行

长理培训客户端 资讯,试题,视频一手掌握

去 App Store 免费下载 iOS 客户端