Java程序员-面试总结

1、Mysql的优化
2、自己常用的设计模式,设计模式的好处
3、Spring的原理或者核心
4、事务的几种传播方式,说说每个的原理
5、hash的原理,如何基于hash重写equals
6、Mysql的索引有哪几种
答案:http://www.cnblogs.com/hustcat/archive/2009/10/28/1591648.html
7、Redis缓存击穿,缓存失效,缓存雪崩,造成问题的解决方案
答案:http://blog.csdn.net/zeb_perfect/article/details/54135506
8、JVM的原理机制
9、堆内存和栈内存怎样优化,如果是溢出,要怎么定义是堆的问题还是栈的问题
10、怎么理解排它锁和互斥锁、乐观锁、悲观锁
11、web.xml加载完毕后,执行顺序是怎么样的?
答案:http://blog.csdn.net/hongshan50/article/details/7335443
12、有两个字符串,比如:a1=”is this aa is”,a2=”this is is aa”,判断为两个字符串大小相等,区分空格和大小写,也就是说只允许两个字符串打乱顺序
解析:当时笔试的时候想到了TreeMap,面试完仔细想想其实不用TreeMap,普通的List也可以搞定,因为面试的时候紧张,一时之间说不出所以然

答案:
核心:重写List的排序方式即可

public class Test {

    public static void main(String[] args) {
        String str1 = "is this is aa";
        String str2 = "This is aa is";
        System.out.println(test(str1, str2));
    }

    public static boolean test(String str1, String str2) {
        boolean flag = true;
        if(str1.length() != str2.length()) {
            return false;
        }

        String[] arr1 = str1.split("\\s+");
        String[] arr2 = str2.split("\\s+");
        List<String> list1 = Arrays.asList(arr1);
        List<String> list2 = Arrays.asList(arr2);

        Collections.sort(list1, new Comparator<String>() {
            public int compare(String o1, String o2) {
                // 升序排序
                return o1.compareTo(o2);
            }
        });

        Collections.sort(list2, new Comparator<String>() {
            public int compare(String o1, String o2) {
                // 升序排序
                return o1.compareTo(o2);
            }
        });

        if(list1.size() != list2.size()) {
            return false;
        }

        for (int i = 0; i < list1.size(); i++) {
            String tempStr1 = list1.get(i);
            String tempStr2 = list2.get(i);
            if(!tempStr1.equals(tempStr2)) {
                flag = false;
                break;
            }
        }
        return flag;
    }

}

总结:
1、基础知识不牢固,不能保证会的东西精通,原理性的东西无法掌握清楚,需要重新回归基础,原来也看过很多基础性的书籍,比如有多少种索引啊,Tomcat深入分析啊、Effective java啊、Spring源码深度解析等书籍,因为很少用,也会忘记
2、面试的时候经常会比较紧张,概念性的东西记不住
3、如果有笔试的话,大多数情况很难发挥出来,做题目的时候会较浮躁,或者说面试官想到了一个问题,问你这个要解决解决的时候,因为都是临场发挥,很难相到或者想周全

接下来自己的打算是:
1、重新从头开始学习Java基础、包括原来性的东西,比如:
JVM机制,GC到底是怎么回收的,如果让你来模拟,怎么实现等问题。。
重点是深入

2、框架性的深入理解,自己简历上面用到的技术,确保要在运用层面的基础上深入理解原理机制

3、了解最新的Java基础生态动态,比如Springboot、SpringCloud,分布式的运用和深入理解原理

☆ 资源说明:☆ [Wrox] Java 编程面试揭秘 英文版 [Wrox] Java Programming Interviews Exposed E Book ☆ 图书概要:☆ If you are a skilled Java programmer but are concerned about the Java coding interview process this real world guide can help you land your next position Java is a popular and powerful language that is a virtual requirement for businesses making use of IT in their daily operations For Java programmers this reality offers job security and a wealth of employment opportunities But that perfect Java coding job won"t be available if you can"t ace the interview If you are a Java programmer concerned about interviewing Java Programming Interviews Exposed is a great resource to prepare for your next opportunity Author Noel Markham is both an experienced Java developer and interviewer and has loaded his book with real examples from interviews he has conducted Review over 150 real world Java interview questions you are likely to encounter Prepare for personality based interviews as well as highly technical interviews Explore related topics such as middleware frameworks and server technologies Make use of chapters individually for topic specific help Use the appendix for tips on Scala and Groovy two other languages that run on JVMs Veterans of the IT employment space know that interviewing for a Java programming position isn"t as simple as sitting down and answering questions The technical coding portion of the interview can be akin to a difficult puzzle or an interrogation With Java Programming Interviews Exposed skilled Java coders can prepare themselves for this daunting process and better arm themselves with the knowledge and interviewing skills necessary to succeed ☆ 出版信息:☆ [作者信息] Noel Markham [出版机构] Wrox [出版日期] 2014年02月17日 [图书页数] 384页 [图书语言] 英语 [图书格式] PDF 格式">☆ 资源说明:☆ [Wrox] Java 编程面试揭秘 英文版 [Wrox] Java Programming Interviews Exposed E Book ☆ 图书概要:☆ If you are a skilled Java programmer but are concerned about the Java coding interview process this real world guide can help you land your next position [更多]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值