Java认证模拟题及分析1
百度广告
question 1)
1) float f=1.3;
3) byte b=257;
5) int i=10;
answer to question 1
--------------------------------------------------------------------------------
what will happen if you try to compile and run the following code
public static void main(string arguments) {
}
system.out.println(arguments);
}
1) error can´t make static reference to void amethod.
3) error array must include parameter
answer to question 2
--------------------------------------------------------------------------------
which of the following will compile without error
import java.awt.*;
class myclass {}
package mypackage;
class myclass{}
/*this is a comment */
import java.awt.*;
answer to question 3
--------------------------------------------------------------------------------
a byte can be of what size
2) (-2 power 8 )-1 to 2 power 8
4)depends on the particular implementation of the java virtual machine
--------------------------------------------------------------------------------
what will be printed out if this code is run with the following command line?
public class myprog{
{
}
1) myprog
3) morning
answer to question 5
--------------------------------------------------------------------------------
which of the following are keywords or reserved words in java?
2) then
4) while
编辑推荐:
温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)
点击加载更多评论>>