熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> 移動開發 >> 正文

JAVA手機開發高級工程師筆試題 威盛電子(中國)

2022-06-13   來源: 移動開發 

選擇題
: Consider the class hierarchy shown below:
&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;
class FourWheeler implements DrivingUtilities
class Car extends FourWheeler
class Truck extends FourWheeler
class Bus extends FourWheeler
class Crane extends FourWheeler
&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;
Consider the following code below:
DrivingUtilities du;
FourWheeler fw;
Truck myTruck = new Truck();
du = (DrivingUtilities)myTruck;
fw = new Crane();
fw = du;
Which of the statements below are true?
Choices:
ALine will not compile because an interface cannot refer to an object
BThe code will compile and run
CThe code will not compile without an explicit cast at line because going down the hierarchy without casting is not allowed
DThe code will compile if we put an explicit cast at line but will throw an exception at runtime :Which method you define as the starting point of new thread in a class from which new the thread can be excution?
Apublic void start()
Bpublic void run()
Cpublic void runnable()
Dpublic static void main(String args[]) :Give the following java class: public class Example{
public static void main(String args[]){ static int x[] = new int[];
Systemoutprintln(x[]); }
} Which statement is corrected?
Give the following java class:
public class Example{
public static void main(String args[]){
static int x[] = new int[];
Systemoutprintln(x[]);
}
}
Which statement is corrected?
AWhen compile some error will occur
BWhen run some error will occur
COutput is zero
DOutput is null :Mathround()等於多少?
A
B
C
Dnone :在下述選項時沒有構成死循環的程序是
Aint i= while () { i=i%+; if (i>) break; }
Bfor (;;);
Cint k=; do { ++k; }while(k>=);
Dint s=; while (s);&#;s; :Which is the most appropriate code snippet that can be inserted at line in the following code?
(Assume that the code is compiled and run with assertions enabled)
import javautil*;

public class AssertTest
{
private HashMap cctld;

public AssertTest()
{
cctld = new HashMap();
cctldput(&#;in&#; &#;India&#;);
cctldput(&#;uk&#; &#;United Kingdom&#;);
cctldput(&#;au&#; &#;Australia&#;);
// more code&#;
}
// other methods &#;
public String getCountry(String countryCode)
{
// What should be inserted here?
String country = (String)cctldget(countryCode);
return country;
}
}
Which is the most appropriate code snippet that can be inserted at line in the following code?
(Assume that the code is compiled and run with assertions enabled)
import javautil*;

public class AssertTest
{
private HashMap cctld;

public AssertTest()
{
cctld = new HashMap();
cctldput(&#;in&#; &#;India&#;);
cctldput(&#;uk&#; &#;United Kingdom&#;);
cctldput(&#;au&#; &#;Australia&#;);
// more code&#;
}
// other methods &#;
public String getCountry(String countryCode)
{
// What should be inserted here?
String country = (String)cctldget(countryCode);
return country;
}
}Aassert countryCode != null;
Bassert countryCode != null : &#;Country code can not be null&#; ;
Cassert cctld != null : &#;No country code data is available&#;;
Dassert cctld : &#;No country code data is available&#;; :給出下面的代碼片斷下面的哪些陳述為錯誤的? ) public void create() {
) Vector myVect; ) myVect = new Vector();
) }
給出下面的代碼片斷下面的哪些陳述為錯誤的?
) public void create() {
) Vector myVect;
) myVect = new Vector();
) }A第二行的聲明不會為變量myVect分配內存空間
B第二行語句創建一個Vector類對象
C第三行語句創建一個Vector類對象
D第三行語句為一個Vector類對象分配內存空間 :在軟件生命周期中下列哪個說法是不准確的?
A軟件生命周期分為計劃開發和運行三個階段
B在計劃階段要進行問題焉醛和需求分析
C在開發後期要進行編寫代碼和軟件測試
D在運行階段主要是進行軟件維護 :Given the following class definition: class A{
protected int i; A(int i){
thisi=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){
thisi=i;
}
}
which of the following would be a valid inner class for this class?
Select valid answer: Aclass B{ }
Bclass B extends A{ }
Cclass B extends A{ B(){Systemoutprintln(i=+i);} }
Dclass B{ class A{} } :What will be printed when you execute the following code?
class X {
Y b = new Y(); X()
{ Systemoutprint(&#;X&#;);
} }
class Y
{ Y()
{ Systemoutprint(&#;Y&#;);
} }
public class Z extends X
{ Y y = new Y();
Z() {
Systemoutprint(&#;Z&#;); }
public static void main(String[] args) {
new Z(); }
}
Choices:
What will be printed when you execute the following code?
class X
{
Y b = new Y();
X()
{
Systemoutprint(&#;X&#;);
}
}
class Y
{
Y()
{
Systemoutprint(&#;Y&#;);
}
}
public class Z extends X
{
Y y = new Y();
Z()
{
Systemoutprint(&#;Z&#;);
}
public static void main(String[] args)
{
new Z();
}
}
Choices:
AZ
BYZ
CXYZ
DYXYZ :Give the following code: public class Example{
public static void main(String args[] ){ int l=;
do{ Systemoutprintln(Doing it for l is:+l);
}while(&#;l>) Systemoutprintln(Finish);
} }
Which well be output:
Give the following code:
public class Example{
public static void main(String args[] ){
int l=;
do{
Systemoutprintln(Doing it for l is:+l);
}while(&#;l>)
Systemoutprintln(Finish);
}
}
Which well be output: ADoing it for l is
BDoing it for l is
CDoing it for l is
DDoing it for l is :Use the operator >> and >>> Which statement is true?
A >> give
B >> give
C >>> give
D >>> give :What will happen when you attempt to compile and run the following code?
int Output = ;
boolean b = false;
if((b == true) &#;&#; ((Output += ) == ))
{
Systemoutprintln(&#;We are equal &#; + Output);
}
else
{
Systemoutprintln(&#;Not equal! &#; + Output);
}
Choices:
What will happen when you attempt to compile and run the following code?
int Output = ;
boolean b = false;
if((b == true) &#;&#; ((Output += ) == ))
{
Systemoutprintln(&#;We are equal &#; + Output);
}
else
{
Systemoutprintln(&#;Not equal! &#; + Output);
}
Choices:ACompilation error attempting to perform binary comparison on logical data type
BCompilation and output of &#;We are equal &#;
CCompilation and output of &#;Not equal! &#;
DCompilation and output of &#;Not equal! &#; :Which statements about Java code security are not true?
AThe bytecode verifier loads all classes needed for the execution of a program
BExecuting code is performed by the runtime interpreter
CAt runtime the bytecodes are loaded checked and run in an interpreter
DThe class loader adds security by separating the namespaces for the classes of the local file system from those imported from network sources :下述程序代碼中有語法錯誤的行是( ) int iia[]ib[]; /*第一行*/
for (i=;i<=;i++) /*第行*/ ia[i]=; /*第行*/
ib=ia; /*第行*/
下述程序代碼中有語法錯誤的行是( )
int iia[]ib[]; /*第一行*/
for (i=;i<=;i++) /*第行*/
ia[i]=; /*第行*/
ib=ia; /*第行*/A
B
C
D
簡答題
:struts中轉換器的實現原理?
:編寫子函數()用冒泡法將一個數組排成升序的函數&#;SUB;()在升序數組中插入一個數並且保持該數組仍為升序數組的函數&#;SUB主函數①輸入任意個正整數給數組;②調用SUB對數組進行排序;③從鍵盤輸入一個正整數調用SUB將其插入該數組
:輸入三個字符串把它們按字典排列依從小到大的順序輸出例如輸入aecadcabc 三個字符串它們按字典排列依從小到大的順序輸出為abcadcaec
:spring中定義為Prototype作用域的bean在什麼時候會被spring銷毀?
:Java中的異常處理機制的簡單原理和應用
:如何判別一個數是unsigned
:hibernate中一個操作單元的范圍是多大?
:tomcat中什麼是DefaultServlet?他的功能是什麼?
:應用服務器與WEB SERVER的區別?
:Set裡的元素是不能重復的那麼用什麼方法來區分重復與否呢?
:With tomcatShow me a simple cluster configuration example


From:http://tw.wingwit.com/Article/program/yd/201404/30442.html
  • 上一篇文章:

  • 下一篇文章: 没有了
  • 推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.