JAVA系统分析笔试题
10-15 23:59:20
来源:http://www.qz26.com 笔试经验 阅读:8953次
导读:Choices:What will be the result of executing the following code?boolean a = true;boolean b = false;boolean c = true;if (a == true)if (b == true)if (c == true) System.out.println("Some things are true in this world");else System.out.println("Nothing is true in this world!");else if (a && (b = c)) System.out.println("It's too confusing to tell what is true and what is false");else System.out.println("Hey this won't
JAVA系统分析笔试题,标签:德勤笔试经验,银行笔试经验,http://www.qz26.com
Choices:
What will be the result of executing the following code?
boolean a = true;
boolean b = false;
boolean c = true;
if (a == true)
if (b == true)
if (c == true) System.out.println("Some things are true in this world");
else System.out.println("Nothing is true in this world!");
else if (a && (b = c)) System.out.println("It's too confusing to tell what is true and what is false");
else System.out.println("Hey this won't compile");
Choices:
A.The code won't compile
B."Some things are true in this world" will be printed
C."Hey this won't compile" will be printed
D.None of these
5:Give the following java source fragement:
//point x
public class Interesting{
//do something
}
Which statement is correctly Java syntax at point x?
Give the following java source fragement:
//point x
public class Interesting{
//do something
}
Which statement is correctly Java syntax at point x?
A.public class MyClass{//do other thing…}
B.static int PI=3.14
C.class MyClass{//do something…}
D.none
6:public class Parent {
int change() {…}
}
class Child extends Parent {
}
Which methods can be added into class Child?
A.public int change(){}
B.abstract int chang(){}
C.private int change(){}
D.none
7:给出下面的代码片断。。。下面的哪些陈述为错误的?
1) public void create() {
2) Vector myVect;
3) myVect = new Vector();
4) }
给出下面的代码片断。。。下面的哪些陈述为错误的?
1) public void create() {
2) Vector myVect;
3) myVect = new Vector();
4) }
A.第二行的声明不会为变量myVect分配内存空间。
B.第二行语句创建一个Vector类对象。
C.第三行语句创建一个Vector类对象。
D.第三行语句为一个Vector类对象分配内存空间
8: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
9:Which fragments are not correct in Java source file?
A.package testpackage; public class Test{//do something...}
B.import java.io.*; package testpackage; public class Test{// do something...}
C.import java.io.*; class Person{// do something...} public class Test{// do something...}
D.import java.io.*; import java.awt.*; public class Test{// do something...}
10:Give the following java class:
public class Example{
static int x[]=new int[15];
public static void main(String args[]){
System.out.println(x[5]);
}
}
Which statement is corrected?
Give the following java class:
public class Example{
static int x[]=new int[15];
public static void main(String args[]){
Choices:
What will be the result of executing the following code?
boolean a = true;
boolean b = false;
boolean c = true;
if (a == true)
if (b == true)
if (c == true) System.out.println("Some things are true in this world");
else System.out.println("Nothing is true in this world!");
else if (a && (b = c)) System.out.println("It's too confusing to tell what is true and what is false");
else System.out.println("Hey this won't compile");
Choices:
A.The code won't compile
B."Some things are true in this world" will be printed
C."Hey this won't compile" will be printed
D.None of these
5:Give the following java source fragement:
//point x
public class Interesting{
//do something
}
Which statement is correctly Java syntax at point x?
Give the following java source fragement:
//point x
public class Interesting{
//do something
}
Which statement is correctly Java syntax at point x?
A.public class MyClass{//do other thing…}
B.static int PI=3.14
C.class MyClass{//do something…}
D.none
6:public class Parent {
int change() {…}
}
class Child extends Parent {
}
Which methods can be added into class Child?
A.public int change(){}
B.abstract int chang(){}
C.private int change(){}
D.none
7:给出下面的代码片断。。。下面的哪些陈述为错误的?
1) public void create() {
2) Vector myVect;
3) myVect = new Vector();
4) }
给出下面的代码片断。。。下面的哪些陈述为错误的?
1) public void create() {
2) Vector myVect;
3) myVect = new Vector();
4) }
A.第二行的声明不会为变量myVect分配内存空间。
B.第二行语句创建一个Vector类对象。
C.第三行语句创建一个Vector类对象。
D.第三行语句为一个Vector类对象分配内存空间
8: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
9:Which fragments are not correct in Java source file?
A.package testpackage; public class Test{//do something...}
B.import java.io.*; package testpackage; public class Test{// do something...}
C.import java.io.*; class Person{// do something...} public class Test{// do something...}
D.import java.io.*; import java.awt.*; public class Test{// do something...}
10:Give the following java class:
public class Example{
static int x[]=new int[15];
public static void main(String args[]){
System.out.println(x[5]);
}
}
Which statement is corrected?
Give the following java class:
public class Example{
static int x[]=new int[15];
public static void main(String args[]){
Tag:笔试经验,德勤笔试经验,银行笔试经验,求职笔试面试 - 笔试经验
下一条:笔试经验:货币银行学基本常识