當(dāng)前位置:高考升學(xué)網(wǎng) > 招聘筆試題 > 正文
選擇題
1:Which modifier should be applied to a method for the lock of object this to be obtained prior to excution any of the method body?
A.synchronized
B.abstract
C.final
D.static
2:
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
3:
What is the result when you compile and run the following code?
public class Test
{
public void method()
{
for(int i = 0; i < 3; i++)
{
System.out.print(i);
}
System.out.print(i);
}
}
Choices:
What is the result when you compile and run the following code?
public class Test
{
public void method()
{
for(int i = 0; i < 3; i++)
{
System.out.print(i);
}
System.out.print(i);
}
}
Choices:
A.0122
B.0123
C.Compilation error
D.None of these
4: Which of the following statements are true?
A.The automatic garbage collection of the JVM prevents programs from ever running out of memory
B.A program can suggest that garbage collection be performed and force it
C.Garbage collection is platform independent
D.An object becomes eligible for garbage collection when all references denoting it are set to null.
5:
Give the following method:
public void method( ){
String a,b;
a=new String(“hello world”);
b=new String(“game over”);
System.out.println(a+b+”ok”);
a=null;
a=b;
System.out.println(a);
}
In the absence of compiler optimization, which is the earliest point the object a refered is definitely elibile to be garbage collection.
Give the following method:
public void method( ){
String a,b;
a=new String(“hello world”);
b=new String(“game over”);
System.out.println(a+b+”ok”);
a=null;
a=b;
System.out.println(a);
}
In the absence of compiler optimization, which is the earliest point the object a refered is definitely elibile to be garbage collection.
A.before line 5
B.before line 6
C.before line 7
D.before line 9
6:
Give this class outline:
class Example{
private int x;
//rest of class body…
}
Assuming that x invoked by the code java Example, which statement can made x be directly accessible in main() method of Example.java?
Give this class outline:
class Example{
private int x;
//rest of class body…
}
Assuming that x invoked by the code java Example, which statement can made x be directly accessible in main() method of Example.java?
A.Change private int x to public int x
B.change private int x to static int x
C.Change private int x to protected int x
D.change private int x to final int x
7:
Given the following class definition:
class A{
protected int i;
A(int i){
this.i=i;
}
}
which of the following would be a valid inner class for this class?
Select valid answer:
Given the following class definition:
class A{
protected int i;
A(int i){
this.i=i;
}
}
which of the following would be a valid inner class for this class?
Select valid answer:
A.class B{ }
B.class B extends A{ }
C.class B extends A{ B(){System.out.println(“i=”+i);} }
D.class B{ class A{} }
8:軟件生命周期的瀑布模型把軟件項(xiàng)目分為3個(gè)階段、8個(gè)子階段,以下哪一個(gè)是正常的開發(fā)順序?
2020年河北新聞網(wǎng)兩學(xué)一做
時(shí)間:2023-09-18 07:0:242020年河北新聞網(wǎng)兩學(xué)一做
時(shí)間:2023-09-15 11:0:59兩學(xué)一做學(xué)習(xí)教育知
時(shí)間:2023-09-21 06:0:302020年開展兩學(xué)一做學(xué)習(xí)教
時(shí)間:2023-09-19 21:0:30
中國(guó)銀聯(lián)筆試題和面試題答案2023-09-15 14:44:48
中國(guó)廣東核電集團(tuán)智力測(cè)試題2023-09-19 07:45:02
陜西國(guó)際商貿(mào)學(xué)院在重慶高考專業(yè)招生計(jì)劃(人數(shù)+代碼)2025-05-22 10:38:12
安徽建筑大學(xué)和新余學(xué)院哪個(gè)好 分?jǐn)?shù)線排名對(duì)比2025-05-22 10:36:54
襄陽(yáng)職業(yè)技術(shù)學(xué)院廣西錄取分?jǐn)?shù)線及招生人數(shù) 附-2020最低位次排名2025-05-22 10:35:29
長(zhǎng)江大學(xué)和新疆師范大學(xué)哪個(gè)好 分?jǐn)?shù)線排名對(duì)比2025-05-22 10:34:16
錦州師范高等?茖W(xué)校在遼寧高考專業(yè)招生計(jì)劃(人數(shù)+代碼)2025-05-22 10:32:49
山東高考排名在17550的考生能報(bào)什么大學(xué)(原創(chuàng))2025-05-22 10:31:33
廣州華立學(xué)院的英語(yǔ)專業(yè)分?jǐn)?shù)線(附2020-最低分排名怎么樣)2025-05-22 10:30:14
蘭州石化職業(yè)技術(shù)大學(xué)的理化測(cè)試與質(zhì)檢技術(shù)專業(yè)分?jǐn)?shù)線(附2020-最低分排名怎么樣)2025-05-22 10:29:06
泉州師范學(xué)院和亳州學(xué)院哪個(gè)好 分?jǐn)?shù)線排名對(duì)比2025-05-22 10:27:53
貴州醫(yī)科大學(xué)在江西高考專業(yè)招生計(jì)劃(人數(shù)+代碼)2025-05-22 10:26:23
東莞城市學(xué)院和西安工商學(xué)院哪個(gè)好 分?jǐn)?shù)線排名對(duì)比2025-05-22 10:24:51
山東海事職業(yè)學(xué)院的水路運(yùn)輸安全管理專業(yè)分?jǐn)?shù)線(附2020-最低分排名怎么樣)2025-05-22 10:23:44 


