java软件开发工程师笔试题
选择题
1:
In the following code, which is the earliest statement, where the object originally held in e, may be garbage collected:
1.public class Test {
2. public static void main (String args []) {
3. Employee e = new Employee("Bob", 48);
4. e.calculatePay();
5. System.out.println(e.printDetails());
6. e = null;
7. e = new Employee("Denise", 36);
8. e.calculatePay();
9. System.out.println(e.printDetails());
10. }
11.}
Only One:
In the following code, which is the earliest statement, where the object originally held in e, may be garbage collected:
1.public class Test {
2. public static void main (String args []) {
3. Employee e = new Employee("Bob", 48);
4. e.calculatePay();
5. System.out.println(e.printDetails());
6. e = null;
7. e = new Employee("Denise", 36);
8. e.calculatePay();
9. System.out.println(e.printDetails());
10. }
11.}
Only One:
A.Line 10
B.Line 11
C.Line 7
D.Line 8
2:Exhibit :
1. public class test (
2. private static int j = 0;
3.
4. private static boolean methodB(int k) (
5. j += k;
6. return true;
6. )
www.77xue.com哦
7.
8. public static void methodA(int i) {
9. boolean b:
10. b = i < 10 | methodB (4);
11. b = i < 10 || methodB (8);
12. )
13.
14. public static void main (String args[] } (
15. methodA (0);
16. system.out.printIn(j);
17. )
18. )
What is the result?
A.The program prints “0”
B.The program prints “4”
C.The program prints “8”
D.The program prints “12”
3:What is written to the standard output given the following statement:System.out.println(4|7);
Select the right answer:
A.4
B.5
C.6
D.7
4:
Select valid identifier of Java:
Select valid identifier of Java:
A.%passwd
B.3d_game
C.$charge
D.this
5:设有变量说明语句int a=1,b=0;
则执行以下程序段的输出结果为( )。
switch (a)
{
case 1:
switch (b)
{
case 0:printf("**0**");break;
case 1:printf("**1**");break;
}
case 2:printf("**2**");break;
}
printf(" ");
A.**0**
B.**0****2**
C.**0****1****2**
D.有语法错误
6:In the following pieces of code, which one will compile without any error?
A.StringBuffer sb1 = "abcd";
B.Boolean b = new Boolean("abcd");
C.C: byte b = 255;
D.float fl = 1.2;
7:
What is the result when you compile and run the following code?
《java软件开发工程师笔试题》相关文章
- java软件开发工程师笔试题
- › JAVA程序员的个人简历模板
- › java软件工程师个人简历模板
- › java工程师简历模板
- › JAVA软件工程师个人简历范文
- › java工程师求职简历模板
- › java软件工程师求职简历
- › java软件工程师英文简历模板
- › java开发工程师个人简历表
- › 求职简历模板-java软件高级工程师
- › 电子商务java软件开发工程师简历范文
- › java高级工程师简历
- › java软件工程师简历
- 在百度中搜索相关文章:java软件开发工程师笔试题
- 在谷歌中搜索相关文章:java软件开发工程师笔试题
- 在soso中搜索相关文章:java软件开发工程师笔试题
- 在搜狗中搜索相关文章:java软件开发工程师笔试题