notify方法
notifyAll方法
wait方法
java中 sleep 和 wait 的区别
3.jdk1.8新特性
4.面向对象的三大特性
5.面向对象的五大原则
6.java中重载和重写的区别
7.怎样声明一个类不会被继承,什么场景下会用?
final修饰的类不能有子类,大部分都是出于安全考虑
String 类举例
8.java中的自增是线程安全的吗,如何实现线程安全的自增
不安全
public class SafeTest {
private static AtomicInteger count = new AtomicInteger(0);
private static final int times = Integer.MAX_VALUE;
public static void main(String[] args) {
long curTime = System.nanoTime();
Thread decThread = new DecThread();
decThread.start();
// 使用run()来运行结果为0,原因是单线程执行不会有线程安全问题
// new DecThread().run();
System.out.println(“Start thread: " + Thread.currentThread() + " i++”);
for (int i = 0; i < times; i++) {
count.incrementAndGet();
}
// 等待decThread结束
while (decThread.isAlive());
long duration = System.nanoTime() - curTime;
System.out.println("Result: " + count);
System.out.format(“Duration: %.2f\n”, duration / 1.0e9);
}
private static class DecThread extends Thread {
@Override
public void run() {
System.out.println(“Start thread: " + Thread.currentThread() + " i–”);
for (int i = 0; i < times; i++) {
count.decrementAndGet();
}
System.out.println(“End thread: " + Thread.currentThread() + " i–”);
}
}
}
9.jdk1.8中的stream有用过吗,详述一下stream的并行操作原理?stream并行的线程池哪来的
10.动态代理的2种方式以及区别?
Java面试核心知识点笔记
其中囊括了JVM、锁、并发、Java反射、Spring原理、微服务、Zookeeper、数据库、数据结构等大量知识点。
Java中高级面试高频考点整理
最后分享Java进阶学习及面试必备的视频教学
数据结构等大量知识点。
[外链图片转存中…(img-RW4dCEj0-1714353401785)]
Java中高级面试高频考点整理
[外链图片转存中…(img-XM0gmJMV-1714353401785)]
[外链图片转存中…(img-zwoQwjY8-1714353401786)]
最后分享Java进阶学习及面试必备的视频教学
[外链图片转存中…(img-vb0LVq1b-1714353401786)]