JAVA程序员笔试题目与答案Word下载.docx
- 文档编号:20756923
- 上传时间:2023-01-25
- 格式:DOCX
- 页数:6
- 大小:17.28KB
JAVA程序员笔试题目与答案Word下载.docx
《JAVA程序员笔试题目与答案Word下载.docx》由会员分享,可在线阅读,更多相关《JAVA程序员笔试题目与答案Word下载.docx(6页珍藏版)》请在冰豆网上搜索。
void
main
(String
[]
args)
StringBuffer
a
StringBuffer("
A"
);
b
("
B"
operate
(a,b);
System.out.println(a
+
"
"
+b);
}
operate(StringBuffer
x,
y)
x.append(y);
y
x;
What
is
the
result?
The
code
compiles
and
prints
“A,B”.
“A,A”.
“B,B”.
“AB,B”.
“AB,AB”.
does
not
compile
because
“+”
cannot
be
overloaded
for
StringBuffer.
3.Given:
BaseClass
private
float
x
1.0f
;
protected
getVar()
{return
Subclass
extends
2.0f;
//insert
here
are
valid
examples
method
overriding?
{
return
double
getVar(float
f)
f;
4.
following
methods
Runnable
interface
A)
run
B)
start
C)
yield
D)
stop
5.
legal
statements?
f=1/3;
int
i=1/3;
f=1.01;
d=999d;
6.
test(
main(string[]
args){
String
foo
args[1];
baz
args[2];
bax
args[3];
}
And
command
line
invocation:
Java
Test
red
green
blue
has
value
“”
null
“red”
“blue”
“green”
compile
program
throws
an
exception
7.
statements
true?
garbage
collection
algorithm
in
vendor
implemented
size
primitives
platform
dependent
default
type
numerical
literal
with
decimal
component
float.
You
can
modify
Instance
setValue
method
8.
1,
j
10;
do
if(i++
>
--j)
continue;
while(i<
5);
After
execution,
what
values
j?
6
j=
5
5
4
6
9.
import
java.io.IOException;
ExceptionTest
(String[]
try
methodA();
catch
(IOException
e)
System.out.println("
Caught
IOException"
(Exception
Exception"
methodA(){
throw
IOException();
will
compile.
output
is:
caught
exception.
IOException.
executes
normally
without
printing
message.
10.
foo(int
i)
if(i==1)
Exception
();
+=
1"
catch(Exception
2"
return;
finally
3"
4"
args[]){
foo(0);
foo
(1);
//line
24
variable
at
24?
11.
implements
1
run
(Thread
t)
2
Running."
Thread(new
Foo()).start();
An
thrown
exists
anything
error
1
causes
compilation
fail.
2
“Running”
printed
exits
12.
ClassOne.java
package
com.abc.pkg1;
ClassOne
char
var
‘a’;
var;
ClassTest.java
com.abc.pkg2;
com.abc.pkg1.ClassOne;
ClassTest
main(String[]args)
ClassOne().getVar();
ClassTest().getVar();
Compilation
fail.
succeeds
no
exceptions
thrown.
but
ClassTest.java.
ClassTest.java.
13.
identifier?
false
default
_object
a-class
14
If
you
below,
gets
out?
s=new
String("
Bicycle"
iBegin=1;
iEnd=3;
System.out.println(s.substring(iBegin,iEnd));
Bic
ic
icy
error:
matching
substring(int,char)
15
happen
when
attempt
code
MySwitch{
main(String
argv[]){
MySwitch
ms=
MySwitch();
ms.amethod();
amethod(){
k=10;
switch(k){
default:
//Put
bottom,
This
output"
break;
case
10:
ten"
20:
twenty"
None
these
options
Compile
time
target
switch
must
integral
type
single
第二部分
:
J2EE部份
1.简述J2EE
Architecture。
2.简述JSP在Web
Container中的生命周期。
3.如何使用数据库连接池?
有什么好处?
4.列举您在开发中用到的一些模式与框架。
模式与框架有什么区别吗?
5.
列举您知道的几种持久化技术。
6.什么是SOA?
WebServices与SOA有什么样的关系?
第三部分
通用知识
1.简述OSI七层协议。
IP/TCP/UDP/HTTP/SMTP分别属于哪一层?
2.简述TMN,TOM,eTOM,
NGOSS四个模型之间的关系。
3.什么是数据库系统?
列举几个常见的数据库系统。
4.请简单描述软件开发过程的主要阶段。
5.请将下面一段文字翻译成中文。
enterprise
service
bus
(ESB)
pattern
middleware
that
unifies
connects
services,
applications
resources
within
business.
Put
another
way,
it
framework
which
capabilities
business’
made
available
reuse
by
other
throughout
organization
beyond.
ESB
software
product
—
it’s
way
looking
how
integrate
applications,
coordinate
manipulate
information.
Unlike
many
previous
approaches
connecting
distributed
example
RPC
or
objects,
enables
connection
running
parallel
on
different
platforms,
written
programming
languages
using
models.
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- JAVA 程序员 笔试 题目 答案