面试题总结(自己总结)

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

AJava是一种解释性语言    BJava是面向对象的语言

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

DJava可以通过API调用编译语言(CC++)编写的函数。

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

Asizeof  B. void  C. const  D. super

3Java语言具有许多优点和特点,下列选项中,哪个反应了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程序事先定义好的可能出现的意外情况

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

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

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

8A bIoCK of text contains 1 00 wordsYou 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 useand which of its method would give the number of distinct woI

A.      Java.util.LinkedList classand its size()method

B.      Java.util.HashSet classand its size()method

C.      Java.util.HashMap classand its size0 method

D.      Java.util.ArrayList classand its size() method

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

AFilter stream  BFile stream  CRandom access stream  DPiped 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  Bgood and gbc  Ctest ok and abc  Dtest 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、先有子类,其他如何排序都无关

13which 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?()

Apublic int hashCode()  Bprotected Object clone()  C public long hashCode()

Dpublic Boolean equals(Object obj)  Epublic long hashCode()  FOnly option E is correct

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

AR  BD  CT  DY

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

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

16Given 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”?

Ax>0  Bx>-3  Cx<=-3  Dx<0&x>-3

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

AThe program developer must create a thread to be responsible for free the memory.

BThe garbage collection will check for and free memory no longer needed.

CThe garbage collection allow the program developer to explicity and immediately free the

momory

DThe garbage collection can free the memory used java object at expect time

18Which of the following statements are legal?()

Along l = 4990;  Bint i = 4L;  Cfloat f = 1.1;  Ddobule d = 34.4;  Edouble t = 0.9F;

 

19public class Parent {}

int change(){...}

}

class Child extends Parent{

}

Which methods can be added into class Child?()

Apbulic int change(){}  Bint chang(int i){}  Cprivate int change(){}  Dabstract int change(){}

 

20class 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?()

ACause error during compiliation  Bsouth  Csourth to north east to west 

Dsouth to north east  Esouth east to west

 

21Given 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  Bline 6  Cline 7  Dline 8  Eline 10

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

Aresult = true;  Bif(result){//do something}  Cif(result != 0){//do something} 

Dresult = 1

23Class 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?()

AIt will construct a Student object  BThe expression is legal 

CIt is illegal at compilation  DIt is legal at compilation but possible illegal at runtime

24Given 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;  Bs2 = s3;  Cm == s1;  Ds1.equals(m);

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

AString name = File.getParentName("file.txt");

BString name = (new File("file.txt")).getParent();

CString name = (new File("file.txt")).getParentName();

DString name = (new File("file.txt")).getParentName();

EDirectory dir = (new File("file.txt")).getParentDir();

   String name = dir.getName();

26Given 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();  Bthis.printValue();  Cperson.printValue();  Dsuper.printValue();

 

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

Aint read(byte[])  Bvoid flush()  Cvoid close()  Dint available()

28Which two create an InputStream and open file the "file.txt" for reading?(Choose Two)

AInputStream in = new FileReader("file.txt");

BInputStream in = new FileInputStream("file.txt");

CInputStream in = new InputStreamFileReader("file.txt","read");

DFileInputStream in = new FileReader(new File("file.txt"));

EFileInputStream in = new FileInputStream(new File("file.txt"));

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

AInputStream  BFile  CFileOutputStream  DString

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

Await()  Bnotify()  Cyield()  Dsuspend()  Esleep()

 

 

 

 

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

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

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

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

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

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

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语言实现单例模式

2jsp中有哪些内置对象

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

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

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

三、数据库

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

2、请写出标准的SQL

有两个表:

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

                    Deptno(primary key),dname,loc

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

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

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

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

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

 

四、综合篇

1Optimistic 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、请添加数列的最后一个数

           261014_;         12529_;

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修饰的变量只能在变量定义时初始化

  Dfinal.不能用于修饰构造方法

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

  Astatic不能作为class的修饰符

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

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

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

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

  A。用户数据报协议

  B.传输控制协议

  C.网际协议

  D。网际控制报文协议

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

    Atar

    Bungzip

    Ccompress

    Duncompress

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

  ATCP协议能保证可靠传输

  BTCP协议建立连接需要进行3次握手

  CTCP协议释放连接需要进行3次握手

  DTCP协议是一个应用层协议

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

  Achar c = ''

  BString 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. 下列对jspforwardredirect的描述正确的有

  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、  请列举出至少3JDK安装目录下的可执行程序( 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);

}

}

Aa.wait();

Bt.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  Babstract  CNULL  DNative

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

As += “books”;

Bchar c = s[1];

Cint len = s.length;

DString t = s.toLowerCase();

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

Achar = ‘abc’;

Blong l = oxfff;

Cfloat f = 0.23;

Ddouble=0.7E-3;

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

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

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

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

D、构造函数不能带参数

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

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

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

C、接口不能被实例化

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

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

Afload f[][] = new fload[6][6];

Bfload []f[] = new fload[6][6];

Cfloat f[][] = new float[][6];

Dfloat [][]f = new float[6][6];

Efloat[][]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请问,正确的语句是?(多选)()

Aargs[0] = “MyTest a b c”

Bargs[0] = “MyTest”

Cargs[0] = “a”

Dargs[1] = ‘b’

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

AString.valueOf(i)

Bi.toString()

C””+I;

DInteger.toString();

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

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

Apublic int method1(int a,int b){return 0;}

Bprivate int method1(int a,int b){return 0;}

Cprivate int method1(int a,long b){return 0;}

Dpublic 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、              已知如下代码:

1class Example {

2  String str;

3  public Example(){

4            str = “example”;

5}

6}

 

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

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

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

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

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

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

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

AgetFrame()  BgetID()  CgetSource()  DgetWindow()

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

AMouseListener  BKeyListener  CActionListener  DItemListener  EWindowListener

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

A、实现Runnable接口

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

C、创建一个Thread的实例

D、继承Thread

17、下面哪几个streamnode流?(多选)()

AFileInputStream  BBufferedInputStream  CPushbackInputStream 

DByteArrayInputStream

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

AInputStreamReader  BBufferedReader  CWriter  DPipedInputStream

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

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

BString a[] = {“”,””,””,””,””};

CString a[5];

DString [5]a;

EString []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应用的视图中包含哪些组件?(多选)()

AJSP  BServlet  CActionServlet  DAction  E、代表业务逻辑或业务数据的JavaBean

FEJB  G、客户化标签

 

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

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

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

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

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

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

AStruts中无法完成上传功能

BStruts框架基于MVC模式

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

DStruts可以有效的降低项目的类文件数目

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

Ahtml.form  Bhtml.text  Chtml.errors  Dhtml.message

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

A、必须使用复杂的框架

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

CMVC影响整个系统的设计

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

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

AModel  BView  CCollection  DController

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

AJSP  BServlet  CActionServlet  DAction  E、代表业务逻辑或业务数据的JavaBean

FEJB  G、客户化标签

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

A、当前action实例的名字

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

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

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

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

AJsp文件实现视图View的功能

BActionServlet这一个类是整个struts项目的控制器

CActionFormAction都属于Model部分

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

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

AHttpSession session = new HttpSession();

BString haha = session.getParameter(“user”);

Csession.removeAttribute(“user”);

Dsession.setAttribute(“user”);

 

 

 

 

 

 

 

一,选择题

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

A、 isUser  B$_Name  Cuser_name  Dtransient

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

Achar a = '\u0061'  Bdouble d = 12.38f  Cfloat f = 0.33  Dint t = 0xBAAC;

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

例如:String str = "333";

Aint ans1 = Integer.parseInt(test);

Bint ans2 = Integer.valueOf(test);

Cint ans3 = ((Integer)(test)).intValue();

Dint ans4 = Integer.valueOf(test).intValue();

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

Anull==undefined;  Bfalse==null;  Cfalse==1;  Dfalse==undefined;

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

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

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

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

D408(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  Btrue true  Cfalse false  Dfalse true

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

A、临时状态(transient)

B、持久化状态(persisted)

C、游离状态(detached)

D、离开状态(deviated)

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

Adb2select * from emp fetch 5 rows only

Bmysql/postgresqlselect * from emp limit 5

Coracleselect * from emp rownum<=5

Dsql serverselect 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、类是对所有具有一定共性的对象的抽象

DJava语言的类支持多继承

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中同名的方法testHiawardOverLoadJava中称为方法的覆盖

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

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

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

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

AString aa = "Hiaward,";int ia=3; aa+=ia;

BString ab = "Hiaward,";int ib=3; if(ib==ab){ab+=ib};

CString ac = "Hiaward,";int ic=3; ac=ic+ac;

DString ad = "Hiaward,";int id=3; ad=id+;

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

var hiaward = new Hiaward();

Ahiaward.xBank

Bhiaward("xBank")

Chiaward["xBank"]

Dhiaward{"xBank"}

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

Aescape  BparseFloat  Ceval  DsetTimeout  Ealert

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对象的属性的是:()

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

BreadyState  对象状态值

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

Dstate  从服务器返回的数字代码

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

Ashort  Bchar  Clong  DString

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

Agetter/setter注入  B、接口注入  C、继承注入  Dconstructor注入

 

二、简答题

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解析的两种方式,DOMSEX区别及联系

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

filalfilally的区别

ArrayListLinkList的区别

collectioncollections的区别与联系

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

 

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

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

 

statementpreparestatement的区别

 

poi等一些基本的操作模块

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

 

线程安全的问题

线程锁释放的问题

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

线程的一些基本问题

webservice技术很重要

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

 

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

 

hibernate的注解方式

 

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 适合毕业设计、课程设计作业。这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。 所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值