首页 > 牛客网java一面
头像
找不到工作被关起来了
编辑于 2020-03-14 09:52
+ 关注

牛客网java一面

牛客网java一面凉经
第一题:
hashCode()  equals(Object o)
附带:volatile的具体作用,可见性你怎么理解,然后又给了代码,问问volatile能不能删除
public class Singleton {

private volatile static Singleton instance = null;

private Singleton(){

}

public static Singleton getInstance(){

    if(instance == null){ 

        synchronized (Singleton.class) {

            if(instance == null){  

                instance = new Singleton();

            }

        }

    }

    return instance;
  }
}



第二题:
mysql

表user

id

name

age


表user_test

user_id

score

class_name


找出score 位于60~69的学生姓名,成绩和课程名,按照成绩降序排列
附带问了:join,索引, 主键索引和普通索引的区别,事务隔离性怎么理解

3 LInux操作
a.log
time   ip   msg
想统计出每一个ip出现的次数,按照次数降序排列
如何查看当前机器的tcp连接情况

4手撕代码英文题

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

For example,
"A man, a plan, a canal: Panama"is a palindrome.
"race a car"is not a palindrome.

Note:
Have you consider that the string might be empty? This is a good question to ask during an interview.

For the purpose of this problem, we define empty string as valid palindrome.


更多模拟面试

全部评论

(5) 回帖
加载中...
话题 回帖