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

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

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

       

Question 31)
Which of the following statements are true?

1) The default layout manager for an Applet is FlowLayout
2) The default layout manager for a Frame is FlowLayout
3) A layout manager must be assigned to an Applet before the setSize method is called
4) The FlowLayout manager attempts to honor the preferred size of any components

Question 32)
Which of the following statements are true about a variable created with the static modifier?

1) Once assigned the value of a static variable may not be altered
2) A static variable created in a method will keep the same value between calls
3) Only one instance of a static variable will exist for any amount of class instances
4) The static modifier can only be applied to a primitive value

Question 33)
Which of the following statements are true?

1) Java uses a system called UTF for I/O to support international character sets
2) The RandomAccessFile is the most suitable class for supporting international character sets
3) An instance of FileInputStream may not be chained to an instance of FileOutputStream
4) File I/O activities requires use of Exception handling

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

  import java.io.*;
class ExBase{
    abstract public void martley(){      
    }

}

public class MyEx extends ExBase{
    public static void main(String argv[]){
        DataInputStream fi = new DataInputStream(System.in);
        try{
     fi.readChar();
        }catch(IOException e){
     System.exit(0);
        }
        finally {System.out.println("Doing finally");}
    }
}   
1) Compile time error
2) It will run, wait for a key press and then exit
3) It will run, wait for a keypress, print "Doing finally" then exit
4) At run and immediately exit

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

public class Borley extends Thread{
    public static void main(String argv[]){
        Borley b = new Borley();
        b.start();
    }
    public void run(){     
        System.out.println("Running");
    }
}
1) Compilation and run but no output
2) Compilation and run with the output "Running"
3) Compile time error with complaint of no Thread target
4) Compile time error with complaint of no access to Thread package

Question 36)
Assuming any exception handling has been set up, which of the following will create an instance of the RandomAccessFile class

1) RandomAccessFile raf=new RandomAccessFile("myfile.txt","rw");
2) RandomAccessFile raf=new RandomAccessFile( new DataInputStream());
3) RandomAccessFile raf=new RandomAccessFile("myfile.txt");
4) RandomAccessFile raf=new RandomAccessFile( new File("myfile.txt"));

Question 37)
Given the following class definition

public class Upton{
public static void main(String argv[]){    
        }
        public void amethod(int i){}
        //Here
}
Which of the following would be legal to place after the comment //Here ?
1) public int amethod(int z){}
2) public int amethod(int i,int j){return 99;}
3) protected void amethod(long l){ }
4) private void anothermethod(){}

Question 38)
Which of the following statements are true?

1) Code must be written if the programmer wants a frame to close on selecting the system close menu
2) The default layout for a Frame is the BorderLayout Manager
3) The layout manager for a Frame cannot be changed once it has been assigned
4) The GridBagLayout manager makes extensive use of the the GridBagConstraints class.


Question 39)
Given the following class definition

public class Droitwich{
        class one{
                private class two{
                        public void main(){
                        System.out.println("two");
                        }
                }
        }
}
Which of the following statements are true


1) The code will not compile because the classes are nested to more than one level
2) The code will not compile because class two is marked as private
3) The code will compile and output the string two at runtime
4) The code will compile without error

Question 40)
Given the following code

class Base{
static int oak=99;
}

public class Doverdale extends Base{
public static void main(String argv[]){
        Doverdale d = new Doverdale();
        d.amethod();
        }
        public void amethod(){
        //Here
        }      
}
Which of the following if placed after the comment //Here, will compile and modify the value of the variable oak?

1) super.oak=1;
2) oak=33;
3) Base.oak=22;
4) oak=50.1;

 

上下文章:

 

上一篇文章: 格林模拟试题三参考答案(3) 下一篇文章: JAVA题库:格林模拟试题三(下)(2)

相关文章:

  • 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 第九软件网 版权所有