[面试] - 面试总结(面试题)

个人愚见,还望大家指出不足!!!(英语水平有限,语法错误应该不少)

java

1.  override和overload的区别

Override appeared in different classes, overload appearedin one class. Override means the child class can override the method which inparent class. Overload means there can be multiple declared in same class.

Override cannot change the input parameters andreturn types, but can change the scope of the method.

Overload must change the input parameters, that canbe the type or count, and can change the return types.

2.     GC机制

Garbage collection means the JVM will collect theobject automatically, and it using a mark-delete method to know which object inmemory is not reachable. Then the not reachable memory will be collect. Andactually we can use System.gc() to collect the garbage manually, but it willdepends on the JVM, so not so sure the garbage will be collect.

3.     HashMap和HashTable 区别和底层实现有什么不同

1)     HashMap remove the mothod contains in HashTable, butadd two method containsKey and containsValue.

2)     HashMap is not thread safely, cause it is not synchronized,but the HashTable is thread safely with synchronized.

3)     The key of value can be null in HashMap, but cannot benull in HashTable.

4.     Vector,LinkList,ArrayList有什么不同

Vector is synchronized, and thread safely. ButArrayList is not.

LinkList means linked list. The item in this willsolve at least 3 parts, 1st should save the previous item’s address,the second one should save the value, and the third one should save ne nextitem’s address. Then if you want remove or add some item in middle on the list,you can just edit the 1st part or 3rd part.

ArrayList means continued space in memory, when wesearch for one of the item. It’ easy, but when we want change it, It’sdifficult, cause we need to copy the list to another space, then remove, andthen copy it back.

5.     值类型和引用类型的区别,在内存中的区别

Data type contains 8 type, Data type saved in stack,reference type saved in heap.

6.     抽象类和接口的区别

Abstract class means a class cannot be instancedand it can have abstract method.

But in interface can only have abstract method andpublic static final field.

And when you want implement these, interface can bemultiple implemented, but the abstract class can only be extends one.

One thing need to notice is that the key words “extends”and “implements”, when there’s two same type, then we need to use the extendsand when there’s different types, then we need to use the implements.

7.     多线程

Two method to archive multiple thread, first one isextends the Thread class, the second one is implement the Runable interface.

How to start a new Thread – Thread.start()

How to stop a thread – thread.interrupt();

Volatile responsible for make sure the field islocked and multiple thread safely.

8.     异常的理解,Exception和RuntimeException区别

Exception is a design thinking. And when theprogram violate the Java program standard, the program should throw anexception.

Exception must be declared to throw or try catch,but the RuntimeException is not need to use the try catch, it will appear whenthe program failed.

9.     webservice是如何实现的

JAX-WS and using the annotation to implement the webservice.

10.  JMS– Don’t know

11.  EJB– Don’t know

12.  内存泄露和内存溢出,java中有没有内存泄露。

Memory leaks, and memory overflow.

Memory leaks means there are memory is notreachable, but the GC cannot collect these memory.

Memory overflow means that when you want set overflowvalue to fixed memory space.

13.  反射

Get the class attributes by dynamic.

Ex. We can get all of the fields and methods by aclass name. And can also get the value of the field and can invoke the methods.

14.  volatile和synchronize的区别

Synchronize responsible for threadsafety.

And volatile responsible for fieldlocked when the java model was serialized.

15.  Serializable

This a interface responsible for markthe object can be serialized to save in the DISK or transform to remote.

16.  forward和redirect的区别

Forward is a server behavior, butredirect is a client behavior.

And forward have one time requestbut redirect have 2 times request.

Forward can only direct to internalpage. But redirect can direct to any page.

Forward can pass the parameters,but redirect cannot.

17.  Stringand StringBuffer and StringBuilder

1)     The different between String and (StringBufferand String Builder)

String is anobject that save the characters, every times you edit the string, you are reallyedit instance a new string object and give the reference to previous object.

StringBuilder orStringBuffer is not like this. Everytime you edit it, it’s really edit itself.

2)     The difference between StringBuffer andStringBuilder

StringBufferis thread safely. But StringBuilder is not.



FrameWork

[Spring]AOP 是如何实现的

[Spring]项目中都用到Spring什么功能

[Spring]Spring MVC的流程

[Spring]Transaction是如何实现的


[Mybatis]insert可不可以返回值

[Mybatis]如何实现mybatis

[Mybatis]如何实现分页


linux

1. 查找某个目录下的文件中的一个字段,统计出现次数

2. 列举目录下的文件

3. 查看当前线程


oracle

1. 分页

2. Store Procedure有没有写过,简单介绍一下

3. Index是什么,简单介绍一下。

4. Trigger是什么,简单介绍一下。

5. 外连接是什么,简单介绍一下。

6. 对表查询有没有什么优化手段?简单介绍一下

7. 如何实现排序 和 分组

8 Transaction的原子性ACID特性

9. 乐观锁,悲观锁

10. JDBC preparestatement 作用是什么,有什么好处


思想

1. 什么是OOP

2. 什么是封装,继承和多态

3. 什么是SOA

4. 简单介绍一下用过的框架和都在什么情景下使用的

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值