• 网络学院
  • IT资讯
  • 操作系统
  • 网络技术
  • 软件应用
  • 办公软件
  • 编程技术
  • 网站架设
  • 数据库类
  • 平面设计
  • 多媒体类
  • 游戏资讯
  • 教学论文
  • 认证考试
JAVA题库:格林模拟试题三(下)(2)
  站点:
  • 首 页
  • 最新软件
  • 文章教程
  • 国内软件
  • 国外软件
  • 绿色软件
  • 源码下载
  • 字体下载
JAVA题库:格林模拟试题三(下)(2)
软件发布 JAVA题库:格林模拟试题三(下)(2)
网络软件 系统工具 应用软件 联络聊天 图形图像 多媒体类 行业软件 游戏娱乐 编程开发 安全相关 教育教学 数码软件 绿软下载
热门软件: QQ 瑞星 pplive e话通 木马克星 千千静听 office2000 五笔字根 Photoshop 视频分割
返回文章教程首页 >> 文章首页 >> 认证考试 >> JAVA认证 >> JAVA题库 >> JAVA题库:格林模拟试题三(下)(2)

JAVA题库:格林模拟试题三(下)(2)

添加时间: 2007-9-22 7:54:36  作者: JAVA认证考试  阅读次数:43   来源: http://www.d9soft.com

       

Question 41)
You are creating an application that has a form with a text entry field used to enter a persons age. Which of the following is appropriate for capturing this information.


1) Use the Text field of a TextField and parse the result using Integer
2) Use the getInteger method of the TextField
3) Use the getText method of a TextBox and parse the result using the getInt method of Integer class
4) Use the getText method of a TextField and use the parseInt method of the Integer class

Question 42)
Given the following declaration


Integer i=new Integer(99);


How can you now set the value of i to 10?


1) i=10;
2) i.setValue(10);
3) i.parseInt(10);
4) none of the above

Question 43)
Which of the following statements are true

1) constructors cannot be overloaded
2) constructors cannot be overridden
3) a constructor can return a primitive or an object reference
4) constructor code executes from the current class up the hierarchy to the ancestor class

Question 44)
Given a reference called

t

to a class which extends Thread, which of the following will cause it to give up cycles to allow another thread to execute.

1) t.yield();
2) Thread.yield();
3) yield(100); //Or some other suitable amount in milliseconds
4) yield(t);

Question 45)
What will happen when you attempt to compile and run the following code?

public class Sandys{
private int court;
public static void main(String argv[]){
        Sandys s = new Sandys(99);
        System.out.println(s.court);
        }
Sandys(int ballcount){
        court=ballcount;
        }
}

1) Compile time error, the variable court is defined as private
2) Compile time error, s is not initialized when the System.out method is called
3) Compilation and execution with no output
4) Compilation and run with an output of 99

Question 46)

Which of the following statements are true?

1) A method cannot be overloaded to be less public in a child class
2) To be overridden a method only needs the same name and parameter types
3) To be overridden a method must have the same name, parameter and return types
4) An overridden method must have the same name, parameter names and parameter types

Question 47)
What will happen when you attempt to compile and run the following code?

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

public class Checket extends Base{
public static void main(String argv[]){
        Checket c = new Checket();
        super();
        }

Checket(){
        System.out.println("Checket"); 
        }      
}
1) Compile time error
2) Checket followed by Base
3) Base followed by Checket
4) runtime error

Question 48)
Which of the following statements are true?

1) Static methods cannot be overriden to be non static
2) Static methods cannot be declared as private
3) Private methods cannot be overloaded
4) An overloaded method cannot throw exceptions not checked in the base class

Question 49)
Which of the following statements are true?

1) The automatic garbage collection of the JVM prevents programs from ever running out of memory
2) A program can suggest that garbage collection be performed but not force it
3) Garbage collection is platform independent
4) An object becomes eligible for garbage collection when all references denoting it are set to null.

Question 50)
Given the following code

public class Sytch{
int x=2000;
public static void main(String argv[]){
        System.out.println("Ms "+argv[1]+"Please pay $"+x);
        }

}
What will happen if you attempt to compile and run this code with the command line
java Sytch Jones Diggle
1) Compilation and output of Ms Diggle Please pay $2000
2) Compile time error
3) Compilation and output of Ms Jones Please pay $2000
4) Compilation but runtime error

Question 51)
What will happen when you attempt to compile and run the following code

class Base{
protected int i = 99;
}
public class Ab{
private int i=1;
public static void main(String argv[]){
Ab a = new Ab();
a.hallow();
}

       abstract void hallow(){
        System.out.println("Claines "+i);
        }

}
1) Compile time error
2) Compilation and output of Claines 99
3) Compilation and output of Claines 1
4) Compilation and not output at runtime

 

上下文章:

 

上一篇文章: JAVA题库:格林模拟试题三(下)(1) 下一篇文章: JAVA题库:格林模拟试题三(下)(3)

相关文章:

  • Oracle加入Grails开源计划提升Java生产力
  • Oracle开发人员JAVA存储过程
  • 用java从oracle取数
  • 史上最强的几道oracle面试题
  • 国外公司的Oracle DBA试题

相关软件:

  • FullJava 1.5
  • 全国计算机等级考试模拟软件(2006年全年使用)二级Visual Basic V9.0
  • 网页特效小精灵(javatx) V2.0
  • Java Perk V6.07
  • 小颖JAVA源代码反编译超级引挚 V1.4 标准版
  • 白金模拟炒股平台 V3.6

 

快速导航

  • 网络学院
  • 精品汇聚
  • 字体下载
  • 教程下载
  • ASP源码
  • PHP源码
  • Net源码
  • JSP 源码

JAVA认证分类导航

  • JAVA动态
  • JAVA指导
  • JAVA题库

本类经典文章推荐

  • SCJP模拟试题[2](2)
  • SCJP模拟试题[2](1)
  • SCJP考试真题和解析[1](2)
  • SCJP Mock Exam 3(1)
  • SCJP考试题310-025[5](1)
  • Java网络编程之URI、URL研究专题一
  • Java认证模拟题及分析(1)
  • SCJP模拟试题[1](3)
  • Java认证模拟题及分析(3)
  • SCJP考试真题和解析[2](3)

JAVA题库阅读排行

  • SCJP Mock Exam 2(2)
  • JAVA题库:考考你4
  • JAVA题库:考考你2
  • Java认证模拟题及分析(3)
  • SCJP考试真题和解析[1](2)
  • Java认证模拟题及分析(1)
  • JAVA题库:格林模拟试题一(上)(2)
  • SCJP模拟试题[2](3)
  • SCJP模拟试题[2](1)
  • SCJP考试真题和解析[1](1)

JAVA认证阅读总排行

  • SCJP Mock Exam 2(2)
  • JAVA题库:考考你4
  • JAVA题库:考考你2
  • Java认证模拟题及分析(3)
  • SCJP考试真题和解析[1](2)
  • Java认证模拟题及分析(1)
  • JAVA题库:格林模拟试题一(上)(2)
  • SCJP模拟试题[2](3)
  • SCJP模拟试题[2](1)
  • SCJP考试真题和解析[1](1)

广告位置

字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 回到顶部

关于我们 | 版权声明 | 免责条款 | 广告联系 | 软件发布 | 下载帮助 | 下载排行 | 网站地图 | 特别鸣谢 | 友情连接

copyright; 2005-2008 D9soft.com 第九软件网 版权所有