當(dāng)前位置:高考升學(xué)網(wǎng) > 招聘筆試題 > 正文
1:Which statements about Java code security are not true?
A.The bytecode verifier loads all classes needed for the execution of a program.
B.Executing code is performed by the runtime interpreter.
C.At runtime the bytecodes are loaded, checked and run in an interpreter.
D.The class loader adds security by separating the namespaces for the classes of the local file system from those imported from network sources.
2: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
3:
Give the following code:
public class Example{
public static void main(String args[] ){
int l=0;
do{
System.out.println(“Doing it for l is:”+l);
}while(--l>0)
System.out.println(“Finish”);
}
}
Which well be output:
Give the following code:
public class Example{
public static void main(String args[] ){
int l=0;
do{
System.out.println(“Doing it for l is:”+l);
}while(--l>0)
System.out.println(“Finish”);
}
}
Which well be output:
A.Doing it for l is 3
B.Doing it for l is 1
C.Doing it for l is 2
D.Doing it for l is 0
4:Math.round(11.5)等於多少?
A.11
B.12
C.11.5
D.none
5:
What will happen when you attempt to compile and run the following code?
int Output = 10;
boolean b1 = false;
if((b1 == true) && ((Output += 10) == 20))
{
System.out.println("We are equal " + Output);
}
else
{
System.out.println("Not equal! " + Output);
}
Choices:
What will happen when you attempt to compile and run the following code?
int Output = 10;
boolean b1 = false;
if((b1 == true) && ((Output += 10) == 20))
{
System.out.println("We are equal " + Output);
}
else
{
System.out.println("Not equal! " + Output);
}
Choices:
A.Compilation error, attempting to perform binary comparison on logical data type
B.Compilation and output of "We are equal 10".
C.Compilation and output of "Not equal! 20".
D.Compilation and output of "Not equal! 10".
6:
What will happen when you attempt to compile and run the following code?
(Assume that the code is compiled and run with assertions enabled.)
public class AssertTest{
public void methodA(int i){
assert i >= 0 : methodB();
System.out.println(i);
}
public void methodB(){
System.out.println("The value must not be negative");
}
public static void main(String args[]){
AssertTest test = new AssertTest();
test.methodA(-10);
}
}
What will happen when you attempt to compile and run the following code?
(Assume that the code is compiled and run with assertions enabled.)
public class AssertTest{
public void methodA(int i){
assert i >= 0 : methodB();
System.out.println(i);
}
public void methodB(){
System.out.println("The value must not be negative");
}
public static void main(String args[]){
AssertTest test = new AssertTest();
test.methodA(-10);
}
}
A.it will print -10
B.it will result in AssertionError showing the message-“the value must not be negative”.
2020年河北新聞網(wǎng)兩學(xué)一做
時間:2023-09-18 07:0:242020年河北新聞網(wǎng)兩學(xué)一做
時間:2023-09-15 11:0:59兩學(xué)一做學(xué)習(xí)教育知
時間:2023-09-21 06:0:302020年開展兩學(xué)一做學(xué)習(xí)教
時間:2023-09-19 21:0:30
和利時系統(tǒng)高級硬件工程師筆試題和面試題答案2023-09-14 05:51:53
新華信國際信息咨詢JAVA工程師筆試題和面試題答案2023-09-18 13:10:37
陜西國際商貿(mào)學(xué)院在重慶高考專業(yè)招生計劃(人數(shù)+代碼)2025-05-22 10:38:12
安徽建筑大學(xué)和新余學(xué)院哪個好 分數(shù)線排名對比2025-05-22 10:36:54
襄陽職業(yè)技術(shù)學(xué)院廣西錄取分數(shù)線及招生人數(shù) 附-2020最低位次排名2025-05-22 10:35:29
長江大學(xué)和新疆師范大學(xué)哪個好 分數(shù)線排名對比2025-05-22 10:34:16
錦州師范高等?茖W(xué)校在遼寧高考專業(yè)招生計劃(人數(shù)+代碼)2025-05-22 10:32:49
山東高考排名在17550的考生能報什么大學(xué)(原創(chuàng))2025-05-22 10:31:33
廣州華立學(xué)院的英語專業(yè)分數(shù)線(附2020-最低分排名怎么樣)2025-05-22 10:30:14
蘭州石化職業(yè)技術(shù)大學(xué)的理化測試與質(zhì)檢技術(shù)專業(yè)分數(shù)線(附2020-最低分排名怎么樣)2025-05-22 10:29:06
泉州師范學(xué)院和亳州學(xué)院哪個好 分數(shù)線排名對比2025-05-22 10:27:53
貴州醫(yī)科大學(xué)在江西高考專業(yè)招生計劃(人數(shù)+代碼)2025-05-22 10:26:23
東莞城市學(xué)院和西安工商學(xué)院哪個好 分數(shù)線排名對比2025-05-22 10:24:51
山東海事職業(yè)學(xué)院的水路運輸安全管理專業(yè)分數(shù)線(附2020-最低分排名怎么樣)2025-05-22 10:23:44 


