JAVA认证格林模拟试题三(上)
来源:优易学  2011-11-28 15:14:39   【优易学:中国教育考试门户网】   资料下载   IT书店
question 1)

which of the following are legal statements?

1) float f=1/3;
2) int i=1/3;
3) float f=1.01;
4) double d=999d;

question 2)

which of the following are java keywords?

1) null
2) new
3) instanceof
4) wend

question 3)

which of the following are valid statements?

1) system.out.println(1+1);
2) int i=2+'2';
3) string s="on"+'one';
4) byte b=255;

question 4)

which of the following statements are true?

1) the garbage collection algorithm in java is vendor implemented
2) the size of primitives is platform dependent
3) the default type for a numerical literal with decimal component is a float.
4) you can modify the value in an instance of the integer class with the setvalue method

question 5)

which of the following are true statements?

1) i/o in java can only be performed using the listener classes
2) the randomaccessfile class allows you to move directly to any point a file.
3) the creation of a named instance of the file class creates a matching file in the underlying operating system only when the close method is called.
4) the characteristics of an instance of the file class such as the directory separator, depend on the current underlying operating system

 

question 6)
which of the following statements are true?
1) the instanceof operator can be used to determine if a reference is an instance of a class, but not an interface.
2) the instanceof operator can be used to determine if a reference is an instance of a particular primitive wrapper class
3) the instanceof operator will only determine if a reference is an instance of a class immediately above in the hierarchy but no further up the inheritance chain
4) the instanceof operator can be used to determine if one reference is of the same class as another reference thus

question 7)
which of the following statements are true?
1) an interface can only contain method and not variables
2) interfaces cannot have constructors
3) a class may extend only one other class and implement only one interface
4) interfaces are the java approach to addressing its lack of multiple inheritance, but require implementing classes to create the functionality of the interfaces.

question 8)
which of the following are valid statements
1) public class mycalc extends math
2) math.max(s);
3) math.round(9.99,1);
4)math.mod(4,10);

question 9)
which of the following are methods of the runnable interface
1) run
2) start
3) yield
4) stop

question 10)

which of the following statements are true?

1) a byte can represent between -128 to 127
2) a byte can represent between -127 to 128
3) a byte can represent between -256 to 256
4) a char can represent between -2x2 pow 16 2 x2 pow 16 - 1

[1] [2] [3] 下一页

责任编辑:小草

文章搜索:
 相关文章
热点资讯
热门课程培训