- 相關推薦
思遷數碼科技招聘java軟件工程師筆試真題
無論是身處學校還是步入社會,許多人都需要跟試題打交道,試題可以幫助主辦方了解考生某方面的知識或技能狀況。什么樣的試題才能有效幫助到我們呢?以下是小編整理的思遷數碼科技招聘java軟件工程師筆試真題,僅供參考,希望能夠幫助到大家。
思遷數碼科技招聘java軟件工程師筆試真題 1
選擇題
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”.
c.the code will not compile.
d.none of these.
7:
what is the result when you compile and run the following code?
public class throwsdemo
{
static void throwmethod()
{
system.out.println("inside throwmethod.");
throw new illegalaccessexception("demo");
}
public static void main(string args[])
{
try
{
throwmethod();
}
catch (illegalaccessexception e)
{
system.out.println("caught " + e);
}
}
}
choices:
what is the result when you compile and run the following code?
public class throwsdemo
{
static void throwmethod()
{
system.out.println("inside throwmethod.");
throw new illegalaccessexception("demo");
}
public static void main(string args[])
{
try
{
throwmethod();
}
catch (illegalaccessexception e)
{
system.out.println("caught " + e);
}
}
}
choices:
a.compilation error
b.runtime error
c.compile successfully, nothing is printed.
d.inside throwmethod. followed by caught:java.lang.illegalaccessexcption: demo
8:假定a和b為int型變量,則執行下述語句組后,b的值為
a=1;
b=10;
do
{
b-=a;
a++;
} while (b—<;0);
a.9
b.-2
c.-1
d.8
9:
public class x{
public object m(){
object o = new float(3.14f);//line 3
object [] oa = new object[1];//line 4
oa[0] = o;//line 5
o=null;//line 6
return oa[0];//line 7
}
}
when is the float object, created in line 3,eligible for garbage collection?
public class x{
public object m(){
object o = new float(3.14f);//line 3
object [] oa = new object[1];//line 4
oa[0] = o;//line 5
o=null;//line 6
return oa[0];//line 7
}
}
when is the float object, created in line 3,eligible for garbage collection?
a.just after line 5.
b.just after line 6
c.just after line 7(that is,as the method returns)
d.never in this method
10:math.round(-11.5)等於多少?
a.-11
b.-12
c.-11.5
d.none
11: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;
12:
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
13:
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[]){
system.out.println(x[5]);
}
}
which statement is corrected?
a.when compile, some error will occur.
b.when run, some error will occur.
c.output is zero.
d.output is null.
14:以下的c程序代碼片段運行后c和d的值分別是多少
int a =1,b =2;
int c,d;
c =(a&;b)&;&;a;
d =(a&;&;b)&;a;
a.0,0
b.0,1
c.1,0
d.1,1
簡答題
15:15個教徒和15 個非教徒在深海上遇險,必須將一半的人投入海中,其余的`人才能幸免于難,于是想了一個辦法:30個人圍成一圓圈,從第一個人開始依次報數,每數到第九個人就將他扔入大海,如此循環進行直到僅余15個人為止。問怎樣排法,才能使每次投入大海的都是非教徒。
16:構造器constructor是否可被override?
17:簡單介紹一下ioc的實現原理。(寫出代碼最好)
18:說出數據連接池的工作機制是什么?
19:列出一些控制流程的方法;
20:找出兩個字符串中最大子字符串,如"abractyeyt","dgdsaeactyey"的最大子串為"actyet"
21:請寫一個java程序實現數據庫緩沖池的功能?
22:tomcat里實現會話session復制,有那些方法?
23:簡單介紹jsp的標記庫?
24:hibernate的2級緩存有那些緩存策略?每種緩存策略的使用范圍?
25:不用乘法或加法給一個數增加7倍。
思遷數碼科技招聘java軟件工程師筆試真題 2
1). applet的運行過程要經歷4個步驟,其中哪個不是運行步驟?
A.瀏覽器加載指定URL中的HTML文件
B.瀏覽器顯示HTML文件
C.瀏覽器加載HTML文件中指定的applet類
D.瀏覽器中的Java運行環境運行該applet
正確答案:B
2). 二維數組A[O,…,8][0,…,9],其每個元素占2字節。從首地址400開始,按行優先順序存儲,則元素A[8][5]的存儲地址為( )。
A.570
B.506
C.410
D.482
正確答案:A
答案解析:A[8][5]元素存儲的位置在第9行第6列,所以A[8][5]之前存儲的個數應為8×10+5 = 85,這些元素占用的空間為85×2字節=170字節,所以A[8][5]的存儲位置為400+170= 570。
3). 用于生產過程控制的系統,一般都是( ),它要求有對輸入數據及時做出響應的能力。
A.批處理系統
B.分時系統
C.實時系統
D.及時系統
正確答案:C
答案解析:用于生產過程控制的系統,一般都是實時系統,它要求有對輸入數據及時做出反應(響應)的能力。由于環境和控制對象以及工作任務的不同,控制系統對計算機系統的要求也會不同,一般會對計算機系統的'可靠性、封閉性、抗干擾性等指標提出要求。
4). Java語言的許多特點中,下列哪個特點是C++語言所不具備的?
A.高性能
B.跨平臺
C.面向對象
D.有類庫
正確答案:B
5). 在匹配器(Matcher)類中,用于尋找下一個模式匹配串的方法是( )。
A.static boolean matches()
B.boolean matcher .fi nd()
C.i nt matcher .start()
D.i nt matcher .end()
正確答案:A
答案解析:本題考查考生對Java 中的匹配器(Matcher)類的理解。Matcher 類用于將一個輸入字符串i nput 和模式串pattern 相比較。Boolean matcher .fi nd()方法用于尋找下一個模式匹配串;i nt matcher .start()方法用于返回匹配串的一個起始索引整數值;i nt matcher .end()方法用于返回匹配串的一個終止索引整數值。而用于輸入字符串與模式串比較的方法是static boolean matches(),選項A 正確。
6). J2EE和( )語言綁定。
A.C
B.C++
C.Java
D.匯編語言
正確答案:C
答案解析:J2EE的基礎是J2SE,以Java為平臺;而C語言用于ODBCAPI。由于兩者不兼容,SUN公司才提出了JDBC作為Java幾個平臺與麴據庫的標準連接。
7). 下列關于結構化設計原則的描述,錯誤的是
A.在塊和進程的非正常出口處往往需要調用GOTO語句,使用GOTO語句使程序執行效率提高,但是濫用GOTO語句確實有害,應該避免使用GOTO語句。
B.程序設計時應該自頂向下,逐步求精。
C.程序設計時,應該將復雜問題進行模塊化,就是將程序設計的總目標分解為若干個分目標,再進一步分解為具體的小目標。
D.在進行程序設計時,應該盡量在一行書寫一條語句,盡量做到效率第一,清晰第二。
正確答案:D
8). 如果線程調用下列方法,不能保證使該線程停止運行的是( )。
A.sleep()
B.stop()
C.yield()
D.wait()
正確答案:C
答案解析:線程的方法中sleep()方法的作用是使比當前線程優先級低的線程運行。該方法使一個線程暫停運行一段固定時間。在休眠時間內,線程將不運行,低優先級的線程將有機會運行。yield()方法為只讓給同等優先級的線程運行。如果沒有同等優先級的線程是可運行狀態,yield()方法將什么也不做,即線程將繼續運行。stop()方法是強行終止線程。wait()方法是線程間交互的方法,是使一個線程停止運行,進入等待狀態。
9). 開發軟件時對提高開發人員工作效率至關重要的是( )。
A.操作系統的資源管理功能
B.先進的軟件開發工具和環境
C.程序員的數量
D.計算機的并行處理能力
正確答案:B
答案解析:先進的軟件開發工具和環境對提高開發人員工作效率是至關重要的。
10). 信息隱蔽的概念與下述哪一種概念直接相關( )。
A.軟件結構定義
B.模塊獨立性
C.模塊類型劃分
D.模擬耦合度
正確答案:B
答案解析:信息隱蔽的概念與模塊獨立性這一概念直接相關。
【思遷數碼科技招聘java軟件工程師筆試真題】相關文章:
青島校園招聘 筆試真題11-21
吉林電信校園招聘筆試真題11-21
大唐軟件java軟件工程師筆試題分享11-21
360軟件工程筆試真題分享11-21
聯想筆試真題11-06
IT軟件筆試樣題及分析11-06
中國農業銀行校園招聘筆試真題11-12
2010淘寶筆試真題11-06
格力筆試真題分享11-21