考试网 >> IT认证 >> JAVA >> JAVA题库 >> JAVA题库:格林模拟试题三(下)

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

发布时间:2006-06-28 10:52     点击:
分页:[1] 2 3 4 5 6 7 8  下一页

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

分页:[1] 2 3 4 5 6 7 8  下一页
版权申明:未经书面授权请勿转载本站信息!!作品版权归所属媒体与作者所有!!
发表评论: 匿名发表 用户名: 查看评论
您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任
留言板管理人员有权保留或删除其管辖留言中的任意内容
本站提醒:不要进行人身攻击。谢谢配合。
在本站搜索相关信息
2003-2005 Ksw123.com All Rights Reserved. - TOP
Copyright © 2006 Ksw123.com. All rights reserved.中国考题网 版权所有