姓名: 联系电话:
一、单项选择
,此类继承了List接口,下列哪个方法是正确的?
A ArrayList myList=new Object();
B List myList=new ArrayList();
C ArrayList myList=new List();
D List myList=new List();
()方法使用哪种类型的参数?
A Graphics
B Graphics2D
C String
D Color
A byte=128;
B Boolean=null;
C long l=0xfffL;
D double=;
public class Example{
String str=new String("good");
char[]ch={'a','b','c'};
public static void main(String args[]){
Example ex=new Example();
(,);
(+" and ");
();
}
public void change(String str,char ch[]){
str="test ok";
ch[0]='g';
}
}
A good and abc
B good and gbc
C test ok and abc
D test ok and gbc
, 会产生什么结果
public class X extends Thread implements Runable{
public void run(){
("this is run()");
}
public static void main(String args[])
{
Thread t=new Thread(new X());
();
}
}
A 第一行会产生编译错误
B 第六行会产生编译错误
C 第六行会产生运行错误
D 程序会运行和启动
" "文件中读出第10个字节到变量C中,下列哪个方法适合?
A FileInputStream in=new FileInputStream(""); (9); int c=();
B FileInputStream in=new FileInputStream(""); (10); int c=();
C FileInputStream in=new FileInputStream(""); int c=();
D essFile i
阳光海融科技面试题java1试题 来自淘豆网www.taodocs.com转载请标明出处.