益模软件Java笔试题

2023-07-06   


java笔试题目
   QUESTION NO: 1
   1. public class Test
   2. public static void main(String args[])
   3. class Foo
   4. public int i = 3;
   5.
   6. Object o = (Object)new Foo();
   7. Foo foo = (Foo)o;
   8. System.out.println(“i = “ + foo.i);
   9.
   10.
   What is the result?
   A. i = 3
   B. Compilation fails.
   C. A ClassCastException is thrown at line 6.
   D. A ClassCastException is thrown at line 7.
  
   QUESTION NO: 2
  
   11. int i =1,j =10;
   12. do
   13. if(i++> –j)
   14. continue;
   15.
   16. while (i j)
   14. break;
   15.
   16. j–;
   17. while (++i


相关内容:

  1. 群胜软件Java笔试题
  2. Java软件工程师综合面试题笔试题
  3. 广州喜创信息技术有限公司JAVA软件工程师笔试题
  4. 北京捷通华声语音技术有限公司Java软件工程师笔试题
  5. 某公司Java工程师面试题笔试题
  6. java笔试题及答案