2016年软件研发工程师笔试题目

  CN人才网有最新的2016年软件研发工程师笔试题目,欢迎大家参考阅读。

  一、选择题

  1、哪个类是所有异常的基础类?

  A.String B.Error C.Throwable D.RuntimeException

  2、设float x = 1,y = 2,z = 3,则表达式 y+=z--/++x的值是:()

  A. 3.5 B. 3 C. 4 D. 5

  3、下列说法正确的是( )

  A.在类方法中可用this来调用本类的类方法 B.在类方法中调用本类的类方法时可直接调用

  C.在类方法中只能调用本类中的类方法 D.在类方法中绝对不能调用实例方法

  4、根据下面的程序代码,哪些选项的值返回true?

  public class Square {

  long width;

  public Square(long l) {

  width = l;

  }

  public static void main(String arg[]) {

  Square a, b, c;

  a = new Square(42L);

  b = new Square(42L);

  c = b;

  long s = 42L;

  }

  }

  A.a == b; B.s == a; C.b == c; D.a.equals(s)

  5. 下面选项中,哪个选项的内容可以作为FilEinputStream类的构造方法的参数?

  A.File B.String C.InputStream D.FileOutputStream

  6. 在下面程序标明的位置处插入哪条语句会导致编译错误?

  public class FinalUse {

  public static void main(String[] args) {

  int x = 0;

  final int y = 1;

  int[] z = { 2 };

  final int[] n = { 3 };

  Use(x, y, z, n);

  }

  static void Use(final int x, int y, final int[] z, int[] n) {

  // 插入内容

  }

  }

  请选择两个正确的答案:

  A.x++ B.y++ C.y=x D.z[0]++ E.n[0]++ F.z=n

  7.下面程序运行后的结果是什么?

  Public class Test{

  Static Boolean foo(char c){

  System.out.print(c);

  Return true;

  }

本文已影响6827
上一篇:2016年百度运营类笔试题目 下一篇:机械设计笔试题目及答案

相关文章推荐

|||||