博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Java程序员进阶必练题
阅读量:4170 次
发布时间:2019-05-26

本文共 3266 字,大约阅读时间需要 10 分钟。

No

Topic

Summary

1

JVM basic concept

1. What's is JVM

2. Concept of JVM, JDK, JRE
3. HotSpot
4. Reference type
5. Garbage Collection

2

How to create new object in Java

1. new

2. deseriablize
3. clone
4. reflect

3

Serializable

1. Official definition

2. Why this interface is introduced.
3. When serialized to Persistent status, which is saved, the class or the object? 
4. How to deal the case when property is an object?
5. How to do rollback the object?
6. Why need set serialVersionUID?
7. What's means of externalizable?

4

Transient

1.official definition, should from Java Spec

2. why this keyword is introduced
3. Can be applied to local variable? Static variable? Method? Class?
4. Use example to express
5. Typical purpose

5

Shadow clone vs deep clone

1. Official definition 

2. Why need clone? Any difference between these 2 types?

6

native

1.official definition, should from Java Spec

2. why this keyword is introduced 
3. Typical usage
4. Example

7

final

1. Official definition 

2. Why this interface is introduced. 
3. What's means of final variable, final method, final class.
4. Typical usage.

8

Volatile

1.official definition, should from Java Spec

2. why this keyword is introduced 
3. Typical usage

9

synchronized

1. Official definition 

2. Why this key word is introduced. 
3. What's means of critical resource, how to avoid competition
4. Give example when applied to method, class

10

MultiThread

1. Multithread code sample

2. Concurrent package in java src

11

How to implement Connection Pool

1. What's connection pool, target

2. The normal connection pool setting
3. How to implement

12

Class and object

1. Inner class

2. anonymous class
3. static class

13

Java similar technology and language

1. Java, .net, c#

2. Groovy, Ruby, Ruby on Rails
3. Python, Scala

14

mutex, futex, spin lock

1. Need know the basic term.

2. Need understand the background knowledge

15

Concurrent

1. Java.concurrent package

2. SynchronizedMap and Map.synchronize method
3. BlockingQueue

16

Generic

1. PECS: Produce Extended, Comsumer Super

17

Collection

1. Map, List, Vector, Set

2. Synchornized and Asynchornized
3. Thread-safe and thread-unsafe

No

Question

1

Why is the String class in Java is final immutable object?

2

What problem(s) does abstraction and encapsulation solve?

3

Why wait, notify and notifyAll is defined in Object Class and not on Thread class in Java

4

How Generics works in Java ? What is type erasure ?

5

Explain difference among raw type list, list<Object> and list<?>

6

Thread类中sleep是为什么是静态方法

7

可以把对静态变量的访问放于synchronized 块内么?

8

final,volatile一起使用可以吗?

Practice:

No

Task

Mandatory

1

现有一个Web Application, 可接受用户请求,现要求将insert类的请求用异步单线程方式保存到数据库中. 

为简化起见,可以不执行真正的insert操作.只需将信息打印出来

Y

2

实现至少3种不同的创建线程的方法

Y

3

You have thread T1, T2 and T3, how will you ensure that thread T2 run after T1 and thread T3 run after T2? These thread already started. Try to implement at least 2 ways.

Y

4

Write a program which will result in deadlock

O

5

先有一个很大的数组,可以一次性load到内存,现要求对该数组进行求和,要求利用到多核

Y

6

写一个例子, 该例子有100个任务,启动线程数字由用户输入,要求给出总处理时间,用CountLatchDown

Y

7

写一个周期性处理任务的例子,在这个例子中有100个任务,希望每10个为一组进行处理,当前仅当上一组任务处理完成后才能进行下一组,另外在每一组任务中,当任务剩下50%,30%以及所有任务执行完成时向观察者发出通知

Y

8

有一些很大的数组,放在数据库中,现在要求对这些数据进行求和,要求尽可能快, 可以考虑程序控制两个多线程段,一个是数据读取的多线程部分,不同的connection取不同的limit,一个是数据求和计算的多线程部分,注意同步

O

转载地址:http://pskai.baihongyu.com/

你可能感兴趣的文章
PG数据库部署linux参数调整
查看>>
Linux shell正则表达式-sed-awk-grep应用
查看>>
linux系统管理—第五章Linux-bashshell
查看>>
PostgreSQL数据库管理 第二章体系结构
查看>>
PostgreSQL数据库管理 第三章实例管理与管理工具
查看>>
PostgreSQL数据库管理第七章流复制
查看>>
PostgreSQL数据库管理第十章Repmgr
查看>>
PostgreSQL数据库管理 第八章日常运维
查看>>
PostgreSQL数据库管理 第五章表空间管理
查看>>
PostgreSQL数据库管理第九章备份恢复
查看>>
PostgreSQL数据库管理数据导入导出
查看>>
MySQL数据库管理-体系结构
查看>>
MySQL数据库部署linux参数调整
查看>>
MySQL数据库管理-安装
查看>>
MySQL数据库单进程多线程数据库
查看>>
Linux系统管理系统性能分析nmon
查看>>
Linux系统管理系统性能分析
查看>>
MySQL数据库文件管理
查看>>
MySQL数据库字符集管理
查看>>
linux系统应用-ftp建立连接优化
查看>>