1
Copyright Tarena Corporation,2009.All rights reserved
JAVASE 部分
1、Choose the three valid identifiers from those listed below. (Choose
three)?
A. IDoLikeTheLongNameClass
B. $byte
C. const
D. _ok
E. 3_case
答:ABD
2、Which of the following lines of code will compile without error (Choose
two)?
A.
int i=0;
if (i) {
System.out.println(“Hi”);
}
B.
boolean b=true;
boolean b2=true;
if(b==b2) {
System.out.println(“So true”);
}
C.
int i=1;
int j=2;
if(i==1|| j==2)
System.out.println(“OK”);
D.
int i=1;
int j=2;
if (i==1 &| j==2)
System.out.println(“OK”);
答:BC
3、Which two demonstrate a "has a" relationship(Choose two)?
A. public interface Person { }
public class Employee extends Person{ }
B. public interface Shape { }
public interface Rectandle extends Shape { }
C. public interface Colorable { }
public class Shape implements Colorable
{ }
D. public class Species{ }
2
Co
-->