ARM 嵌入式系統(tǒng)開發(fā)與應(yīng)用面試題(筆試題)_第1頁
ARM 嵌入式系統(tǒng)開發(fā)與應(yīng)用面試題(筆試題)_第2頁
ARM 嵌入式系統(tǒng)開發(fā)與應(yīng)用面試題(筆試題)_第3頁
ARM 嵌入式系統(tǒng)開發(fā)與應(yīng)用面試題(筆試題)_第4頁
ARM 嵌入式系統(tǒng)開發(fā)與應(yīng)用面試題(筆試題)_第5頁
已閱讀5頁,還剩1頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

電訊盈科ARM嵌入式系統(tǒng)開發(fā)與應(yīng)用招聘試題PCCW

Solutions

Junior

Developer

Testing

Exam

姓名_________專業(yè)________________學(xué)校______________成績____

Part

I:Core

Java

1)

Given:

1.

public

class

Test

{

2.

public

static

void

main(String

args[])

{

3.

class

TestInner

{

4.

public

int

i

=

3;

5.

}

6.

Object

o

=

new

TestInner

();

7.

TestInner

ti

=

(TestInner)o;

8.

System.out.println(“i

=

+

ti.i);

9.

}

10.

}

What

is

the

result?

A.

i

=

3

;

B.

Compilation

fails.

C.

A

ClassCastException

is

thrown

at

line

6.

D.

A

ClassCastException

is

thrown

at

line

7.

2)

Given:

11.

int

i

=

1,j

=

10;

12.

do

{

13.

if(i>j)

{

14.

break;

15.

}

16.

j--;

17.

}

while

(++i

<5);

18.

System.out.println(“i

=”

+i+”

and

j

=

“+j);

What

is

the

result?

A.

i

=

6

and

j

=

5

B.

i

=

5

and

j

=

5

C.

i

=

6

and

j

=

4

D.

i

=

5

and

j

=

6

E.

i

=

6

and

j

=

6

3)

Given:

1.

public

interface

Foo

{

2.

int

k

=

4;

3.

}

Which

three

are

equivalent

to

line

2?

(Choose

three)

A.

final

int

k

=

4;

B.

public

int

k

=

4;

C.

static

int

k

=

4;

D.

abstract

int

k

=

4;

E.

volatile

int

k

=

4;

F.

protected

int

k

=

4;

4)

Given:

1.

package

test1;

2.

public

class

Test1

{

3.

static

int

x

=

42;

4.

}

1.

package

test2;

2.

public

class

Test2

extends

test1.Test1

{

3.

public

static

void

main(String[]

args)

{

4.

System.out.println(“x

=

+

x);

5.

}

6.

}

What

is

the

result?

A.

x

=

0

B.

x

=

42

C.

Compilation

fails

because

of

an

error

in

line

2

of

class

Test2.

D.

Compilation

fails

because

of

an

error

in

line

3

of

class

Test1.

E.

Compilation

fails

because

of

an

error

in

line

4

of

class

Test2.

5)

Given:

class

A

{

protected

int

method1(int

a,

int

b)

{

return

0;

}

}

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;

}

6)

Given:

1.

class

TestSuper

{

2.

TestSuper(int

i)

{

}

3.

}

4.

class

TestSub

extends

TestSuper{

}

5.

class

TestAll

{

6.

public

static

void

main

(String

[]

args)

{

7.

new

TestSub();

8.

}

9.

}

Which

is

true?

A.

Compilation

fails.

B.

The

code

runs

without

exception.

C.

An

exception

is

thrown

at

line

7.

D.

An

exception

is

thrown

at

line

2.

7)

Given:

Thread

Z

holds

the

lock

on

object

A.

Thread

X

is

blocked

inside

a

wait

call

on

ObjectA.

What

allows

thread

X

to

become

runnable?

A.

Thread

X

is

interrupted.

B.

Thread

X

is

interrupted.

C.

Thread

X’s

wait()

times

out.

D.

Thread

Z

calls

Thread.sleep(100);

E.

Thread

Z

releases

the

lock

on

A

and

calls

the

notify()

method

on

thread

X.

F.

Thread

Z

releases

the

lock

on

A

and

calls

the

notifyAll()

method

on

objectA.

8)

Given:

11.

ArraryList

a

=

new

ArrayList();

12.

a.add(“Alpha”);

13.

a.add(“Bravo”):

14.

a.add(“Charlie”);

15.

a.add(“Delta”);

16.Iterator

iter

=

a.iterator();

17.

Which

two,

added

at

line

17,

print

the

names

in

the

ArrayList

in

alphabetical

order?

(Choose

two)

A.

for

(int

i=0;

i<

a.size();

i++)

System.out.println(a.get(i)));

B.

for

(int

i=0;

i<

a.size();

i++)

System.out.println(a[i]);

C.

while(

iter.hasNext()

)

System.out.println(iter.next())

D.

for

(int

i=0,

i<

a.size();

i++)

System.out.println(iter[i]);

E.

for

(int

i=0;

i<

a.size();

i++)

System.out.println(iter.get(i));

9)

Given:

11.

String

a

=

“ABCD”;

12.

String

b

=

a.toLowerCase();

13.

b.replace(‘a(chǎn)’,

‘d’);

14.

b.replace(‘b’,

‘c’);

15.

System.out.println(b);

What

is

the

result?

A.

abcd

B.

ABCD

C.

dccd

D.

dcba

E.

Compilation

fails.

F.

An

exception

is

thrown

at

runtime.

10)

Given:

1.

public

class

Foo

{

2.

public

static

void

main

(String

[]

args)

{

3.

StringBuffer

a

=

new

StringBuffer

(“pccw”);

4.

StringBuffer

b

=

new

StringBuffer

(“solutions”);

5.

operate

(a,b);

6.

system.out.printIn{a

+

“,”

+b};

7.

)

8.

static

void

operate

(StringBuffer

x,

StringBuffer

y)

{

9.

x.append

(y);

10.

y

=

x;

11.

)

12.

}

What

is

the

result?

A.

The

code

compiles

and

prints

“pccw,solutions”.

B.

The

code

compiles

and

prints

“pccw,pccw”.

C.

The

code

compiles

and

prints

“solutions,solutions”.

D.

The

code

compiles

and

prints

“pccwsolutions,solutions”.

E.

The

code

compiles

and

prints

“pccwsolutions,

pccwsolutions”.

F.

The

code

does

not

compile

because

“+”

cannot

be

overloaded

for

StringBuffer.

11)

Given:

1.

public

class

X

{

2.

public

static

void

main

(String[]

args)

{

3.

byte

b

=

127;

4.

byte

c

=

126;

5.

byte

d

=

b

+

c;

6.

}

7.

}

Which

statement

is

true?

A.

Compilation

succeeds

and

d

takes

the

value

253.

B.

Line

5

contains

an

error

that

prevents

compilation.

C.

Line

5

throws

an

exception

indicating

“Out

of

range”

D.

Line

3

and

4

contain

error

that

prevent

compilation.

E.

The

compilation

succeeds

and

d

takes

the

value

of

1.

12)

Given:

Which

two

create

an

InputStream

and

open

file

the

“file.txt”

for

reading?

(Choose

Two)

A.

InputStream

in=new

FileReader(“file.txt”);

B.

InputStream

in=new

FileInputStream(“file.txt”);

C.

InputStream

in=new

InputStreamFileReader

(“file.txt”,

“read”);

D.

FileInputStream

in=new

FileReader(new

File(“file.txt”));

E.

FileInputStream

in=new

FileInputStream(new

File(“file.txt”));

Part

II:Java

EE

13)

Given

a

servlet

HelloServlet

mapped

to

hello.

and

a

form

declaration

in

HTML:

11.

<form

action="hello">

12.

<input

type="text"

name="hello">

13.

<input

type="text"

name="world">

14.

<input

type="submit"

value="submit">

15.</form>

what

HelloServlet

method

is

invoked

as

a

result

of

this

form

submission?

A.doGet

B.doPut

C.doPost

D.doTrace

E.doSubmit

14)

Given:

10.public

void

service(HttpServletRequest

resquest,HttpServletResponse

response){

11.

//

your

code

here

12.}

Which

code

snippet

inserted

at

line

11

cause

the

client

to

redirect

to

?

A.

response.sendRedirect("");

B.

response.sendRedirect(new

URL(""));

C.

RequestDispatch

rd

=

getServletContext().getRequestDispatcher("");

rd.forward(request,response);

D.

RequestDispatch

rd

=

getServletContext().getRequestDispatcher(new

URL(""));

rd.forward(request,response);

15)

Which

three

are

valid

URL

mapping

to

a

servlet

in

a

web

deployment

descriptor?(choose

three)

A.*/*

B./*.do

C.MyServlet

D./MyServlet

E./MyServlet/*

F.MyServlet/*.jsp

16)

Given

an

HttpServletRequest

request,which

retrieves

an

object

of

type

Account

with

and

id

of

"account"?

A.

Account

account

=

request.getResource("account");

B.

Account

account

=

request.getAttribute("account");

C.

Account

account

=

request.getParameter("account");

D.

Account

account

=

(Account).getResource("account");

E.

Account

account

=

(Account).getAttribute("account");

F.

Account

account

=

(Account).getParameter("account");

17)

For

which

three

event

can

web

application

event

listeners

be

registered?(choose

three)

A.

when

a

session

is

created

B.

after

a

servlet

is

destroyed

C.

when

a

session

has

timed

out

D.

when

a

cookie

has

been

created

E.

when

a

servlet

has

forwarded

a

request

F.

when

a

session

attribute

value

is

changed

Part

III:Database

18)

Which

two

statements

about

views

are

true?

(Choose

two.)

A.

A

view

can

be

created

as

read

only.

B.

A

view

can

be

created

as

a

join

on

two

or

more

tables.

C.

A

view

cannot

have

an

ORDER

BY

clause

in

the

SELECT

statement.

D.

A

view

cannot

be

created

with

a

GROUP

BY

clause

in

the

SELECT

statement.

E.

A

view

must

have

aliases

defined

for

the

column

names

in

the

SELECT

statement

19)

Examine

the

data

from

the

ORDERS

and

CUSTOMERS

table.

ORDERS

ORD_ID

ORD_DATE

CUST_ID

ORD_TOTAL

100

12-JAN-2000

15

10000

101

09-MAR-2000

40

8000

102

09-MAR-2000

35

12500

103

15-MAR-2000

15

12000

104

25-JUN-2000

15

6000

105

18-JUL-2000

20

5000

106

18-JUL-2000

35

7000

107

21-JUL-2000

20

6500

108

04-AUG-2000

10

8000

CUSTOMERS

CUST_ID

CUST_NAME

CITY

10

Smith

Los

Angeles

15

Bob

San

Francisco

20

Martin

Chicago

25

Mary

New

York

30

Rina

Chicago

35

Smith

New

York

40

Linda

New

York

Which

SQL

statement

retrieves

the

order

ID,

customer

ID,

and

order

total

for

the

orders

that

are

placed

on

the

same

day

that

Martin

places

his

orders?

A.

SELECT

ord_id,

cust_id,

ord_total

FROM

orders,

customers

WHERE

cust_name=’Mating’

AND

ord_date

IN

(’18-JUL-2000’,’21-JUL-2000’);

B.

SELECT

ord_id,

cust_id,

ord_total

FROM

orders

Where

ord_date

IN

(SELECT

ord_date

FROM

orders

WHERE

cust_id

=

(SELECT

cust_id

FROM

customers

WHERE

cust_name

=‘Martin’));

C.

SELECT

ord_id,

cust_id,

ord_total

FROM

orders

Where

ord_date

IN

(SELECT

ord_date

FROM

orders,

customers

Where

cust_name

=

‘Martin’);

D.

SELECT

ord_id,

cust_id,

ord_total

FROM

orders

WHERE

cust_id

IN

(SELECT

cust_id

FROM

customers

WHERE

cust

name

=

‘Martin’);

20)

Examine

the

structure

of

the

EMPLOYEES

and

NEW_EMPLOYEES

tables:

EMPLOYEES

EMPLOYEE_ID

NUMBER

Primary

Key

FIRST_NAME

VARCHARD2(25)

LAST_NAME

VARCHARD2(25)

HIRE_DATE

DATE

NEW

EMPLOYEES

EMPLOYEE_ID

NUMBER

Primary

Key

NAME

VARCHAR2(60)

Which

UPDATE

statement

is

valid?

A.

UPDATE

new_employees

SET

name

=

(Select

last_name||first_name

FROM

employees

Where

em

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論