当前位置:高考知识网 > 招聘笔试题 > 正文

Java工程师笔试题和面试题答案(四)

更新时间:2023-08-23 07:49:30 高考知识网 www.xjdkctz.com

  }

  printf(" ");

  A.*0*

  B.*0*2*

  C.*0*1*2*

  D.有语法错误

  15:关于垃圾收集的哪些叙述是对的。

  A.程序开发者必须自己创建一个线程进行内存释放的工作。

  B.垃圾收集将检查并释放不再使用的内存。

  C.垃圾收集允许程序开发者明确指定并立即释放该内存。

  D.垃圾收集能够在期望的时间释放被java对象使用的内存。

  简答题

  16:请设计一个Java程序,程序中要进行数组操作和除法操作,要求对所设计的程序可能出现的异常进行处理。

  17:说明Jsp中errorPage的作用,应用范围。

  18:在一个文件中有 10G 个整数,乱序排列,要求找出中位数。内存限制为 2G。只写出思路即可。

  19:swtich是否能作用在byte上,是否能作用在long上,是否能作用在String上?

  20:请指出下面程序中的错误:

  class Father

  {

  private int age;

  public void setAge(int a)

  {

  this.age = a;

  }

  public int getAge()

  {

  return age;

  }

  public void disp()

  {

  System.out.println("age is " + age);

  }

  }

  class Son extends Father

  {

  String name;

  public void setName(String name)

  {

  name = name;

  }

  public void disp()

  {

  disp();

  System.out.println("my name is " + name);

  }

  }

  public class Test

  {

  public static void main(String args[])

  {

  Son s = new Son();

  s.disp();

  }

  }

  21:RandomAccessFile类的主要用途是什么?它和File类有什么区别?

  22:J2EE是一种技术还是一种平台,他提供了那些技术。

  23:

  找出其中的错误,并说明原因。

  interface Playable {

  void play();

  }

  interface Bounceable {

  void play();

  }

  interface Rollable extends Playable, Bounceable {

  Ball ball = new Ball("PingPang");

  }

  class Ball implements Rollable {

  private String name;

  public String getName() {

  return name;

  }

  public Ball(String name) {

  this.name = name;

  }

  public void play() {

  ball = new Ball("Football");

  System.out.println(ball.getName());

  }

  }

  找出其中的错误,并说明原因。

  interface Playable {

  void play();

  }

  interface Bounceable {

  void play();

  }

  interface Rollable extends Playable, Bounceable {

  Ball ball = new Ball("PingPang");

  }

  class Ball implements Rollable {

  private String name;

  public String getName() {

  return name;

  }

  public Ball(String name) {

  this.name = name;

  }

  public void play() {

  ball = new Ball("Football");

  System.out.println(ball.getName());

  }

  }

  24:什么保存一个父对象,而它的关联对象没有自动储存到数据库里?

  25:Java的国际化?

阅读了本文,本站向荣网(mrnum)笔试频道,还为你提供以下可能你会感兴趣的笔试题相关文章:

腾讯网页设计实习生笔试题

百度笔试题及答案

网易游戏校园招聘渠道规划师笔试题目