4444444

1. 要从文件" file.dat"文件中读出第10个字节到变量C中,下列哪个方法适合?
A. FileInputStream in=new FileInputStream("file.dat");
in.skip(9);
int c=in.read();
B. FileInputStream in=new FileInputStream("file.dat");
in.skip(10);
int c=in.read();
C. FileInputStream in=new FileInputStream("file.dat");
int c=in.read();
D. RandomAccessFile in=new RandomAccessFile("file.dat");
in.skip(9);
int c=in.readByte();


2、break语句( )
A、只中断最内层的循环 B、只中断最外层的循环
C、借助于标号,可以实现任何外层循环中断 D、只中断某一层的循环

3、给出如下代码:
class Test{
private int m;
public static void fun() {
// some code...
}
}
如何使成员变量m被函数fun()直接访问?
A、将private int m改为protected int m B、将private int m改为public int m
C、将private int m 改为static int m D、将private int m改为int m

4. 请说出下列代码的执行结果 :
public class test {
public static void main(String[] args) {
Integer a1 = new Integer(20);
Integer a2 = new Integer(20);
if(a1= =a2)
System.out.println("a1= =a2");
if(a1.equals(a2))
System.out.println("equals");
}
};
A. equals
B. a1= =a2
C. 什么都不输出
D. 程序错误

5. 如果有一个对象 myListener, 为了使 myListener 对象能够接受并处理来自于 smallButton 按钮对象的点击动作事件, myListener 对象应该实现哪个接口 ?
A. ActionListener
B. ItemListener
C. MouseListener
D. WindowListener
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值