面试题总结(自己总结)

1、关于JaVa的描述哪一个是错误的( )

A.Java是一种解释性语言 B.Java是面向对象的语言

C.Java通过不同硬件平台安装同一个JVM实现来实现的可移植性

D.Java可以通过API调用编译语言(如C或C++)编写的函数。

2、哪个不是Java关键字( )

A.sizeof B. void C. const D. super

3、Java语言具有许多优点和特点,下列选项中,哪个反应了Java程序并行机制的特点()

A安全性 B多线程 C跨平台 D可移植

4、下列哪个类声明是正确的( )

A abstract final class H1(…)

B abstract private move()(…)

C protected private number;

D public abstract class Car(…)

5、下列关for循环和while循环的说法中哪个是不正确的( )

A while循环能实现的操作,for循环也都能实现

B while循环判断条件一般是程序结果,for循环判断条件一般是非程序结果

C两种循环任何时候都可替换

D两种循环结构中都必须有循环体,循环体不能为空

6、异常包含下列哪些内容( )

A程序中的语法错误 B程序的编译错误

C程序执行过程中遇到的事先没有预料到的情况

D程序事先定义好的可能出现的意外情况

7、Character流与Byte流的区别是( )

A每次读入的字节数不同 B前者带仃缓冲,后者没有

C前者是块读写后者是字节读写 D 二者没有区别.可以互换使用

8、A bIoCK of text contains 1 00 words.You are required to make a list of djStinct word

Words; moreover you are required to report how many distinct words exist in that block 0f

Collection class would you use;and which of its method would give the number of distinct woI

A. Java.util.LinkedList class,and its size()method

B. Java.util.HashSet class,and its size()method

C. Java.util.HashMap class,and its size0 method

D. Java.util.ArrayList class,and its size() method

9、为实现多线程之间的通信,需要使用下列哪种流才合适()

A、Filter stream B、File stream C、Random access stream D、Piped stream

10、指出下列程序运行的结果()

Public class Example(){

String str = nnew String(“good”);

char[] ch = {‘a’,’b’,’c’};

public void change(String str,char ch[]){

str = “test ok”;

ch[0] = ‘g’;

}

}

A、 good and abc B、good and gbc C、test ok and abc D、test and gbc

11、运行下列程序,会产生的结果是()

Public class X extends Thread implements Runable{

Public void run(){

System.out.println(“this is run()”);

}

Public static void main(String args[])

{

Thread t = new Thread(new X());

t.start();

}

}

A、 第一行会产生编译错误

B、 第七行会产生编译错误

C、 第七行会产生运行错误

D、 程序会运行和启动

12、对于catch子句的排序,下列哪种是正确的()

A、父类在先,子类在后

B、子类在先,父类在后

C、有继承关系的一场不能在同一个try程序段内

D、先有子类,其他如何排序都无关

13、which of the following method(s) must be implemented correctly if the class has to behave properly and consistently with all java collection classes and interfaces?()

A、public int hashCode() B、protected Object clone() C 、public long hashCode()

D、public Boolean equals(Object obj) E、public long hashCode() F、Only option E is correct

14、Java中,数值类型值中可以出现的符号是()

A、R B、D C、T D、Y

15、构造方法何时被调用()

A、类定义时 B、创建对象时 C、调用对象方法时候 D、使用对象的变量时

16、Given the following code()

If(x>0){System.out.println(“first”); }

else if(x>-3){ System.out.println(“second”); }

else { System.out.println(“third”); }

which range of x value would print the string “second”?

A、x>0 B、x>-3 C、x<=-3 D、x<0&x>-3

17、which statements about the garbage collection are true?()

A、The program developer must create a thread to be responsible for free the memory.

B、The garbage collection will check for and free memory no longer needed.

C、The garbage collection allow the program developer to explicity and immediately free the

momory

D、The garbage collection can free the memory used java object at expect time

18、Which of the following statements are legal?()

A、long l = 4990; B、int i = 4L; C、float f = 1.1; D、dobule d = 34.4; E、double t = 0.9F;



19、public class Parent {}

int change(){...}

}

class Child extends Parent{

}

Which methods can be added into class Child?()

A、pbulic int change(){} B、int chang(int i){} C、private int change(){} D、abstract int change(){}



20、class Parent{

String one,two;

public Parent(String a,String b){

one = a;

two = b;

}

public void print(){System.out.println(one); }

}

public class Child extends Parent{

public Child(String a,String b){

super(a,b);

}

public void print(){

System.out.pringln(one+"to"+two);

}

public static void main(String arg[]){

Parent p = new Parent("south","north");

Parent t = new Child("east","west");

p.print();

t.print();

}

}

Which of the following is correct?()

A、Cause error during compiliation B、south C、sourth to north east to west

D、south to north east E、south east to west



21、Given the following code ()

1)class Parent{

2)private String name;

3)public Parent(){}

4)}

5)public Child extends Parent{

6)private String department;

7)public Child(){}

8)public String getValue(){return name; }

9)public static void main(String arg[]){

10)Parent p = new Parent();

11)}

12)}

which line will cause error?

A、 line 3 B、line 6 C、line 7 D、line 8 E、line 10

22、The variable "result" is boolean.Which expressions are legal?()

A、result = true; B、if(result){//do something} C、if(result != 0){//do something}

D、result = 1

23、Class Teacher and Student are subclass of class Person.

Person p;

Teacher t;

Student s;

p,t and s are all non-null.

if(t instanceof Person){s = (Student)t; }

What is the result of this sentence?()

A、It will construct a Student object B、The expression is legal

C、It is illegal at compilation D、It is legal at compilation but possible illegal at runtime

24、Given the following class;

public class Sample{

long length;

public Sample(long l){length = 1; }

public static void main(String arg[]){

Sample s1,s2,s3;

s1 = new Sample(21L);

s2 = new Sample(21L);

s3 = s2;

long m = 21L;

}

}

Which expression returns true?()

A、 s1 = s2; B、s2 = s3; C、m == s1; D、s1.equals(m);

25、Which gets the name of the parent directory file "file.txt"?

A、String name = File.getParentName("file.txt");

B、String name = (new File("file.txt")).getParent();

C、String name = (new File("file.txt")).getParentName();

D、String name = (new File("file.txt")).getParentName();

E、Directory dir = (new File("file.txt")).getParentDir();

String name = dir.getName();

26、Given the following code;

class Person{

String name,department;

public void print Value(){

System.out.println("name is"+name);

System.out.pringln("department is "+department);

}

}

public class Teacher extends Person{

int salary;

public void printValue(){

//doing the same as in the parent method printValue()

//including print the vlue of name and department

System.out.println("salary is "+salary);

}

}

Which expression can be added at the "doing the same as..." part of the method printValue()?

()

A、 printValue(); B、this.printValue(); C、person.printValue(); D、super.printValue();



27、Which is not a method of the class InputStream?()

A、int read(byte[]) B、void flush() C、void close() D、int available()

28、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"));

29、Which classes can be used as the argument of the constructor of the class FileInputStream?()

A、InputStream B、File C、FileOutputStream D、String

30、Which of the following will definitely stop a thread from executing?

A、wait() B、notify() C、yield() D、suspend() E、sleep()









1、 简述Collection和Collections的区别,并详细描述Collection的使用过程

2、 运行时异常与一般异常有何异同

3、 Java如何进行精确数值计算,Math.round(11/6)等于多少?

4、 简述Servlet的生命周期,以及Servlet的基本结构

5、 Jsp中动态include和静态include的区别

6、 简述Statmeent和PrepareStatement之间的区别,单次查询情况下用哪个效率高?

7、 使用jdbc,Hibernate访问Oracle数据库,如何实现页面分页功能

8、 当一个对象被当做单数传递到一个方法后,此方法可改变这个对象的属性,并可返回变化后的结果,那么这里到底是值传递还是引用传递?

9、 请写一个Singleton范例

10、 有一个由自然数和都好组成的字符串,数字中间用都好分割,例如”3,2,2211,7,8,9980,….,1000,???,1”,请编写程序进行处理,将字符串中的数字按照数字由小到大重新排列,如”3,5,6,7,8,9,…9980…”(省略号表示此处有多个数字)【小样儿,必须至少给我弄出两种方法来】





一、

1、请画一个典型的微型计算机体系结构图

2、操作系统通常由哪几部分组成

二、

1、列举几种常见的GoF模式,用Java语言实现单例模式

2、jsp中有哪些内置对象

3、简述ioc的含义,谈谈ioc在Spring中的使用

4、Ajac只的是什么,你了解哪些Ajax框架或相关技术?

5、Java中解析XML有哪几种方式?

三、数据库

1、什么是表的主键和外键

2、请写出标准的SQL

有两个表:

部门号(部门号,部门名,部门位置):dept

Deptno(primary key),dname,loc

员工号(员工号,员工姓名,工作,工资,所属部门号):emp

Empno(primary key),ename,job,sal,deptno

(1)、列出每个员工的姓名,工作,部门号,部门名

(2)、列出emp表中各部门的部门号,最高工资,最低工资

(3)、根据部门号由高到低,工资有低而高列出每个员工的姓名,部门号,工资



四、综合篇

1、Optimistic concurrency alone doesn’t give you any performance improvement, but it’s necessary step to enable cache-between-transactions functionality which is not available without enabling optimistic concurrency. Setting cache-between-transactions to ‘true’ will result in Container skipping calls to ejbLoad() if bean instance is already available in the EJB cache

请翻译上述语句



2、谈谈你对云计算的理解,你认为它对软件开发、系统集成产生什么影响?



3、请添加数列的最后一个数

2,6,10,14,_; 1,2,5,29,_;

4、什么在激励你的工作?

5、在团队中,你扮演哪些角色?哪个最成功?

6、你从事软件开发职位有哪些优势和劣势?











一、选择题:

1.表达式(15/2^2)的值是

A. 5

B. 15

C. 14

D. 0

2.下列对final修饰符的描述,正确的有

A.被final修饰的claSS不能被继承

B.被final修饰的方法不能被重载(0verload)

C.被final修饰的变量只能在变量定义时初始化

D.final.不能用于修饰构造方法

3. 下列对static修饰符的描述,正确的有

A.static不能作为class的修饰符

B.被static修饰的成员变量和成员方法独立于该类的任何对象

C.被static修饰的成员(类、方法、成员变量)不能再使用private进行修饰

D。static代码块(静态代码块),在类的构造函数之前被执行

4.下列的网络协议中,面向连接的的协议是

A。用户数据报协议

B.传输控制协议

C.网际协议

D。网际控制报文协议

5.在linux系统中能解压test.Z压缩文件的命令是

A.tar

B.ungzip

C.compress

D.uncompress

6.下列对TCP协议的描述正确的有

A.TCP协议能保证可靠传输

B.TCP协议建立连接需要进行3次握手

C.TCP协议释放连接需要进行3次握手

D.TCP协议是一个应用层协议

7.下列对变量的定于语句中合法的有

A.char c = '我'

B.String str = '我'

C. byte b = 128

D. float f = 1

8. 下列操作数据DDL的有

A.select B.drop C.insert D.update E.alert

9. 以下数据结构中不属于线性数据结构的是

A.队列 B.线性表 C.二叉树 D.栈

10. 下列对jsp中forward和redirect的描述正确的有

A.forward操作不会在用户浏览器里展现跳转地址

B.redirect操作不会在用户浏览器里展现跳转地址

C.forward操作会把原始请求数据转发给跳转地址

D.redirect操作会把原始请求数据转发给跳转地址

二、翻译题

原文来自(Java Concurrency in Practice),请译成中文

When used properly,threads can reduce development and maintenance ... and improve the

performance of complex applications. Thread make it easier to model how humans work and

interact,by turning asynchronous workflows into mostly sequential ones, Threads are useful in GUI applications for improving the responsiveness of the user interface. and in server

applications for improving resource utilization and throughport.



二、简答题

1、 请列举出至少3个JDK安装目录下的可执行程序(如 javac),并列举几个常用的命令行参数。

2、 请分析命题:“Java采用自动垃圾回收技术(GC),因此不会出现内存泄露“。

3、 请简单描述单子模式(单例模式)的几种不同实现方式,及各自优缺点,请列举至少2种其他的设计模式及应用场景。

三、程序阅读题

1、 下面程序片段的输出结果是

public static void main(String[] args){

int x = 3;

int y = 1;

if (x = y) System.out.println(“Not equal”);

else System.out.println(“Equal”);

}

2、 在(1)处添加什么代码,可以确保程序输出值是100

Class B implements Runnable {

Int i;

Public void run(){

Try{Thread.sleep(1000); }catch(InterruptedException e){}

i = 100;

}

}

Public class Test {

Public static void main(String[] args) throws Exception {

B b = new B();

Thread t = new Thread(b);

t.start();

//(1)

Int j = b.i;

System.out.println(j);

}

}

A、a.wait();

B、t.wait();
C、t.join();
D、t.yield();
E、t.notify();
F、a.notify();
G、t.interrupt();

3、请指出下列程序片段的输出结果

Public static void main(String[] args) throws Exception {

String str = “中国”;

System.out.println(str.getBytes(“UTF-8”).length);

System.out.println(str.getBytes(“GBK”).length);

System.out.println(str.getBytes(“ISO-8859-1”).length);

System.out.println(new String(str.getBytes(“ISO-8859-1”),”ISO-8859-1”));

System.out.println(new String(str.getBytes(“UTF-8”),”UTF-8”));

System.out.println(new String(str.getBytes(“GBK”),”GBK”));

}

四、编程题

请使用二分查找算法查找字符串数组{“a”,”b”,”c”,”d”,”e”,”f”,”g”,”h”},找出其中的”g”元素。

【自己去总结下常见的集中排序算法】









1、 为Java语言中的关键字的下列选项有:()

A、 sizeOf B、abstract C、NULL D、Native

2、 已知如下定义:String s = “story”; 下面合法的表达式有:(多选)()

A、s += “books”;

B、char c = s[1];

C、int len = s.length;

D、String t = s.toLowerCase();

3、下面语句中,正确的是()

A、char = ‘abc’;

B、long l = oxfff;

C、float f = 0.23;

D、double=0.7E-3;

4、下列关于构造函数描述正确的是()

A、构造函数可以声明返回类型。

B、构造函数不可以用private修饰

C、构造函数名必须与类名相同。

D、构造函数不能带参数

5、以下叙述正确的是()(多选)

A、接口中不能有抽象方法

B、一个类可以实现多个接口

C、接口不能被实例化

D、接口中可以包含已实现的方法

6、下面那个语句是创建数组的正确语句?(多选)()

A、fload f[][] = new fload[6][6];

B、fload []f[] = new fload[6][6];

C、float f[][] = new float[][6];

D、float [][]f = new float[6][6];

E、float[][]f = new float[6][];

7、已知如下代码:

public class Test{

long a[] = new long[10];

public static void main(String[] args) {

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

}

}

请问,正确的语句是?()

A、 输出为空 B、输出0. C、编译通不过 D、编译通过,运行时会出错

8、已知如下的命令执行java MyTest a b c请问,正确的语句是?(多选)()

A、args[0] = “MyTest a b c”

B、args[0] = “MyTest”

C、args[0] = “a”

D、args[1] = ‘b’

9、把一个int型变量i转换为字符串,哪几个办法是对的?(多选)()

A、String.valueOf(i)

B、i.toString()

C、””+I;

D、Integer.toString();

10、已知:class A{protected int method1(int a ,int b){ return o; }}

请问,在A类的子类中,下面哪几个方法能编译通过?(多选)()

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; }

11、已知如下代码:

Public class Test{

long a[] = new long[10];

public static void main(String arg[]){

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

}

}

请问下列描述正确的是?()

A、 输出为空 B、输出0 C、编译通不过 D、编译通过,运行时会出错

11、 已知如下代码:

1:class Example {

2: String str;

3: public Example(){

4: str = “example”;

5:}

6:}



13、在如下源代码文件Test.java中,请问,正确的类定义是?(多选)()

A、public class test {public int x = 0; public test(int x){this.x = x; }}

B、public class Test{public int x = 0; public Test(int x){this.x = x; }}

C、public class Test extends T1,T2 {public int x = 0; public Test(int x){this.x = x; }}

D、public class Test extends T1{public int x = 0; public Test(int x){this.x = x; }}

E、protected class Test extends T2 {public int x = 0; public Test(int x){this.x = x; }}

14、如下哪几个方法可以从WindowEvent获取事件源?(多选)()

A、getFrame() B、getID() C、getSource() D、getWindow()

15、下面哪几个时间监听器在Java中有时间适配器?(多选)()

A、MouseListener B、KeyListener C、ActionListener D、ItemListener E、WindowListener

16、下面哪几个方法可用于定义新线程类?(多选)()

A、实现Runnable接口

B、在类中添加run()方法

C、创建一个Thread的实例

D、继承Thread类

17、下面哪几个stream是node流?(多选)()

A、FileInputStream B、BufferedInputStream C、PushbackInputStream

D、ByteArrayInputStream

18、哪几个类可用于处理Unicode?(多选)()

A、InputStreamReader B、BufferedReader C、Writer D、PipedInputStream

19、下面那些语句能够正确地生成5个字符串?(多选)()

A、String a[] = new String[5]; for(int i=0; i<5; a[++]=””)

B、String a[] = {“”,””,””,””,””};

C、String a[5];

D、String [5]a;

E、String []a = new String[5]; for(int i=0; i<5.a[i++]=null);

20、下面那些选项将是下述程序的输出?(多选)()

public class Outer{

public static void main(String args[]){

Outer:for(int i = 0; i<3; i++)

Inner:for(int j=0; j<3; j++){

If(j>1)

Break;

System.out.println(j+”and”+i);

}

}

}

21、在Struts应用的视图中包含哪些组件?(多选)()

A、JSP B、Servlet C、ActionServlet D、Action E、代表业务逻辑或业务数据的JavaBean

F、EJB G、客户化标签



22、struts框架中,关于FormBean,下列那些说法是正确的?()

A、FormBean是一种数据bean,主要用来封装表单提交上来的数据,并把这些数据传递给Action

B、在FormBean中可以对页面上传递来的参数进行一下格式上的验证,这种验证是一种客户端的验证

C、用户每次提交表单,都会产生一个新的FormBean实例

D、动态FormBean不能进行验证操作

23、关于struts框架,下面错误的是:()

A、Struts中无法完成上传功能

B、Struts框架基于MVC模式

C、Struts框架容易引起流程复杂,结构不清晰等问题

D、Struts可以有效的降低项目的类文件数目

24、在下面的标签中那些事struts标签(多选)()

A、html.form B、html.text C、html.errors D、html.message

25、下面关于MVC说法错误的有哪些?(多选)()

A、必须使用复杂的框架

B、使用内建的RequestDispatcher能够很好的实现MVC

C、MVC影响整个系统的设计

D、我们可以用MVC来处理单个请求

26、下面的哪一个不属于MVC模式中的对象?()

A、Model B、View C、Collection D、Controller

27、struts应用的控制器包含哪些部分?(多选)()

A、JSP B、Servlet C、ActionServlet D、Action E、代表业务逻辑或业务数据的JavaBean

F、EJB G、客户化标签

28、struts框架中,在一个Action的配置信息中,name属性指的是?()

A、当前action实例的名字

B、当前action所在的类的名字

C、该Action中调用的FormBean的实例是名字

D、该Action中调用的FormBean的类的所在包名

29、关于struts项目中的类与MVC模式的对应关系,说法错误的是?()

A、Jsp文件实现视图View的功能

B、ActionServlet这一个类是整个struts项目的控制器

C、ActionForm、Action都属于Model部分

D、一个struts项目只能有一个Servlet

30、下面关于Session的用法哪些是错误的?(多选)()

A、HttpSession session = new HttpSession();

B、String haha = session.getParameter(“user”);

C、session.removeAttribute(“user”);

D、session.setAttribute(“user”);















一,选择题

1、 以下不符合java标识符定义规范的是()

A、 isUser B、$_Name C、user_name D、transient

2、以下Java基本类型中声明不正确的一项是:()

A、char a = '\u0061' B、double d = 12.38f C、float f = 0.33 D、int t = 0xBAAC;

3、以下string转化为int类型中,错误的是()

例如:String str = "333";

A、int ans1 = Integer.parseInt(test);

B、int ans2 = Integer.valueOf(test);

C、int ans3 = ((Integer)(test)).intValue();

D、int ans4 = Integer.valueOf(test).intValue();

4、以下JavaScript表达式中值为true的是:()

A、null==undefined; B、false==null; C、false==1; D、false==undefined;

5、以下描述关于AJAX中服务器返回状态中,错误的是:()

A、200(ok):指示客户端的请求成功收到,解析,接受

B、404(Not Found):服务器已经找到任何匹配Request-URI的资源

C、500(Internal Server Error):服务器遭遇异常阻止了当前请求的执行

D、408(Requeust Timeout):服务器没有相应的执行动作来完成当前请求。

6、已经定义以下类:

public class HiawardEquals{

private long id;

public HiawardEquals(long id) {this.setId(id); }

public long getId() {return id; }

public void setId(long id){this.id = id; }

public boolean equals(Object obj) {return true; }

public static vodi main(String[] args){

HiawardEquals hiaward1 = new HiawardEquals(1);

HiawardEquals hiaward2 = new HiawardEquals(1);

System.out.print(hiaward1.equals(hiaward2+" "));

System.out.print(hiaward1 == hiaward2);

}

}

以上程序的输出结果为:()

A、 true false B、true true C、false false D、false true

7、以下描述中不属于Hibernate中Java对象持久性状态为:()

A、临时状态(transient)

B、持久化状态(persisted)

C、游离状态(detached)

D、离开状态(deviated)

8、以下sql语句功能为限制emp返回行数为5行,其中语句错误的是:()

A、db2:select * from emp fetch 5 rows only

B、mysql/postgresql:select * from emp limit 5

C、oracle:select * from emp rownum<=5

D、sql server:select top 5 * from emp



9、关于下面一段代码,哪项描述是正确的?()

publicclass HiawardThreadRun {

publicstaticvoid main(String argv[]) {

HiawardThreadRun a = new HiawardThreadRun();

a.go();

}

publicvoid go(){

HiawardThreadRunSub ds1 = new HiawardThreadRunSub("one");

ds1.start();

}

}

class HiawardThreadRunSub extends Thread {

private String sTname = "";

publicvoid run() {

notwait();

System.out.println("finished");

}

publicvoid notwait(){

while (true){

try{

System.out.println("waiting");

wait();

}catch(InterruptedException ie){



}

System.out.println(sTname);

notifyAll();

}

}

}

A、编译错误

B、能够编译,输出"waiting"

C、能够编译,输出"waiting",紧接着输出"finish"

D、运行时错误,会抛异常

10、编译运行下面的代码,以下结果中描述正确的是?()(写出结果即可)

publicclass HiawardExtends extends Thread {

private String sThreadName;

publicstaticvoid main(String[] args) {

HiawardExtends h = new HiawardExtends();

h.go();

}

HiawardExtends(){}

HiawardExtends(String s){sThreadName = s; }

public String getThreadName(){returnsThreadName; }

publicvoid go(){

HiawardExtends first = new HiawardExtends("first");

first.start();

HiawardExtends second = new HiawardExtends("second");

second.start();

}

publicvoid start(){

for (int i = 0; i < 2; i++){

System.out.println(getThreadName()+i);

try {

Thread.sleep(100);

} catch (InterruptedException e) {

System.out.println(e.getMessage());

}

}

}

}











1、 面向对象程序设计的基本特征是:()

A、 抽象 B、封装 C、继承 D、多态

2、 下列关于类说法正确的是:()

A、类是Java语言中的一种复合数据类型

B、类中包含数据变量和方法

C、类是对所有具有一定共性的对象的抽象

D、Java语言的类支持多继承

3、编译并运行下面的程序,运行结果为:()

publicclass HiawardOverLoad {

publicstaticvoid main(String[] args) {

HiawardOverLoad overLoad = new HiawardOverLoad();

HiawardOverLoad.testHiawardOverLoad();

}

void testHiawardOverLoad(){System.out.println("A"); }

}

class HiawardOverLoadSub extends HiawardOverLoad {

void testHiawardOverLoad() {

super.testHiawardOverLoad();

System.out.println("B");

}

}

A、子类HiawardOverLoadSub定义了与父类HiawardOverLoad中同名的方法testHiawardOverLoad,Java中称为方法的覆盖

B、代码可以编译运行,并输出结果:AB

C、代码可以编译运行,并输出结果:A

D、类HiawardOverLoadSub定义了与父类HiawardOverLoad中同名的方法testHiawardOverLoad,Java中称为方法的重载

4、以下表达式那个是正确的?()

A、String aa = "Hiaward,"; int ia=3; aa+=ia;

B、String ab = "Hiaward,"; int ib=3; if(ib==ab){ab+=ib};

C、String ac = "Hiaward,"; int ic=3; ac=ic+ac;

D、String ad = "Hiaward,"; int id=3; ad=id+;

5、Javascript中,Hiaward对象有xBank属性,hiaward定义如下代码,如需要获取xBank属性的值,以下哪些做法不正确:()

var hiaward = new Hiaward();

A、hiaward.xBank

B、hiaward("xBank")

C、hiaward["xBank"]

D、hiaward{"xBank"}

6、以下哪些是javascript的全局函数:()

A、escape B、parseFloat C、eval D、setTimeout E、alert

7、关于DB2数据库sql语句的描述中,正确的是:()

A、随即返回记录:

select name from Hiaward order by rahnd() fetch 5 rows only

B、按字符串排序(取消后面两位):

select job from Hiaward order by substr(job,length(job)-3)

C、从一个表中查找另一个表中没有的值:

select deptno from Hiaward except select deptno from MIBS

D、使用一个已存在的表定义新建新表:

create table Hiaward2 like Hiaward

8、以下选项中属于XMLHttpRequest对象的属性的是:()

A、responseText 从服务器进程返回数据的字符串形式

B、readyState 对象状态值

C、onreadystatechange 每次状态改变所触发事件的事件处理程序

D、state 从服务器返回的数字代码

9、以下数据switch作用域范围的是:()

A、short B、char C、long D、String

10、以下选项中属于spring依赖注入方法的为:()

A、getter/setter注入 B、接口注入 C、继承注入 D、constructor注入



二、简答题

1、请使用struts+hibernate+spring实现简单的用户登录过程(要求:java代码部分只要写出接口和方法即可,方法体不需要实现,SSH整合的配置需要些出来)【这个必须给我做出来】



2、请使用javascript脚本语言,根据面向对象的思想,完成以下要求:

1)对象名称为Car,需要包括属性:color(车颜色),category(车分类),date(出厂日期),name(车主名字),Plate(号牌)

2)对象需要提供放阿飞:根据车的类型获得车的速度,根据车的号牌得到车主名字;根据车的号牌得到车的颜色和出厂日期(颜色和出场日期存放在数组中)

3)需要自行实现测试方法去调用2)中实现的方法;













以下是间断性整理的一些知识模块:

数据结构,算法

标签库的创建及引用和工作过程 doStartTag doEndTag uri

servlet的各种生命周期,过程等

set,map,list一定要熟悉

HashMap,Hashtable的区别

jsp中各种隐含变量,范围

jsp标签的创建,工作原理

请求转发和重定向的区别及用法

jsp实现多态方法有哪些

xml解析的两种方式,DOM和SEX区别及联系

hibernate是怎么样从数据库中取出数据并带到程序中去使用(流程)

filal和filally的区别

ArrayList和LinkList的区别

collection和collections的区别与联系

运行时异常与非运行时异常的区别和联系



23种设计模式(最少掌握其中的5中,并且实际运用)

单例类的几种实现方式【两种实现方式给俺搞明白了讲给我听】



statement和preparestatement的区别



poi等一些基本的操作模块

ioc,aop在项目里主要用在哪些地方



线程安全的问题

线程锁释放的问题

是否能编译通过,是否能执行通过的问题

线程的一些基本问题

webservice技术很重要

谈谈spring的几种依赖注入方式



ssh写一个简单的用户登录功能



hibernate的注解方式



缓存的几种实现方式,并实际运用

    推荐阅读