哎 我应聘了N家公司 给你一些题好了
华为的
第一部分:选择题
QUESTION NO: 1
1、public class Test {
public static void changeStr(String str){
str="welcome";
}
public static void main(String[] args) {
String str="1234";
changeStr(str);
Systemoutprintln(str);
}
}
Please write the output result :
QUESTION NO:2
1 public class Test {
2 static boolean foo(char c) {
3 Systemoutprint(c);
4 return true;
5 }
6 public static void main( String[] argv ) {
7 int i =0;
8 for ( foo('A'); foo('B')&&(i<2); foo('C')){
9 i++ ;
10 foo('D');
12 }
13 }
14 }
What is the result
A ABDCBDCB
B ABCDABCD
C Compilation fails
D An exception is thrown at runtime
QUESTION NO: 3
1 class A {
2 protected int method1(int a, int b) { return 0; }
3 }
Which two are valid in a class that extends class A (Choose two)
A public int method1(int a, int b) { return 0; }
B private int method1(int a, int b) { return 0; }
C private int method1(int a, long b) { return 0; }
D public short method1(int a, int b) { return 0; }
E static protected int method1(int a, int b) { return 0; }
QUESTION NO: 4
1 public class Outer{
2 public void someOuterMethod() {
3 // Line 3
4 }
5 public class Inner{}
6 public static void main( String[]argv ) {
7 Outer o = new Outer();
8 // Line 8
9 }
10 }
Which instantiates an instance of Inner
A new Inner(); // At line 3
B new Inner(); // At line 8
C new oInner(); // At line 8
D new OuterInner(); // At line 8//new Outer()new Inner()
QUESTION NO: 5
Which method is used by a servlet to place its session ID in a URL that is written to the servlet’s response output stream
A The encodeURL method of the >
以上就是关于谁能发个全国计算机考试的JAVA真题给我笔试题全部的内容,包括:谁能发个全国计算机考试的JAVA真题给我笔试题、软考程序员考什么内容,要准备什么书,考哪方面的、软考初级 程序员,网络管理员,信息处理技术员都分别是考什么等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)