面试结束复盘查漏补缺
每次面试都是检验自己知识与技术实力的一次机会,面试结束后建议大家及时总结复盘,查漏补缺,然后有针对性地进行学习,既能提高下一场面试的成功概率,还能增加自己的技术知识栈储备,可谓是一举两得。
以下最新总结的阿里P6资深Java必考题范围和答案,包含最全MySQL、Redis、Java并发编程等等面试题和答案,用于参考~
重要的事说三遍,关注+关注+关注!
更多笔记分享
System.out.print(“建表成功”);
state.close();
testcon.close();
}
}
===================================================================
public void insert() throws SQLException{
String sql=“INSERT INTO TEST VALUES(1,‘LALALA’)”;
Connection testcon=getConn();
PreparedStatement pre=testcon.prepareStatement(sql);
try{
pre.executeUpdate();
}catch(SQLException e){
System.out.print(e);
}
System.out.print(“插入成功”);
pre.close();
testcon.close();
}
===================================================================
public void update() throws SQLException{
String sql=“UPDATE TEST SET C2=‘HAHAHA’ WHERE C1 =1”;
Connection testcon=getConn();
PreparedStatement pre=testcon.prepareStatement(sql);
try{
pre.executeUpdate();
}catch(SQLException e){
System.out.print(e);
}
System.out.print(“修改成功”);
pre.close();
testcon.close();
}
===================================================================
public void select() throws SQLException{
String sql=“SELECT * FROM TEST;”;
Connection testcon=getConn();
Statement state=testcon.createStatement();
ResultSet res=state.executeQuery(sql);
while(res.next()){
System.out.println(
res.getInt(1)+“,”+
res.getString(2)
);
}
}
===================================================================
public void delete() throws SQLException{
String sql=“DELETE FROM TEST WHERE C1=1”;
Connection testcon=getConn();
PreparedStatement pre=testcon.prepareStatement(sql);
try{
pre.executeUpdate();
}catch(SQLException e){
System.out.print(e);
}
System.out.print(“删除成功”);
pre.close();
testcon.close();
}
===================================================================
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.io.*;
import java.sql.*;
import java.util.Date;
import javafx.scene.control.Tab;
class Connec{
public Connection getConn(){
Connection conn=null;
String name=“dm.jdbc.driver.DmDriver”;
String url=“jdbc:dm://127.0.0.1:5237”;
String user=“SYSDBA”;
String password=“wf1105tm0306”;
try{
Class.forName(name);
conn=DriverManager.getConnection(url,user,password);
System.out.println(“数据库连接成功”);
}catch(Exception e){
System.out.println(e);
}
return conn;
}
}
class Table extends Connec{
public void create() throws SQLException{
String sql_1=“DROP TABLE TEST;”;
String sql_2=“CREATE TABLE TEST(C1 INT,C2 VARCHAR(50));”;
Connection testcon=getConn();
Statement state=testcon.createStatement();
try{
state.executeUpdate(sql_2);
}catch(SQLException e){
state.executeUpdate(sql_1);
state.executeUpdate(sql_2);
}
System.out.print(“建表成功”);
state.close();
testcon.close();
}
public void insert() throws SQLException{
String sql=“INSERT INTO TEST VALUES(1,‘LALALA’)”;
Connection testcon=getConn();
PreparedStatement pre=testcon.prepareStatement(sql);
try{
pre.executeUpdate();
}catch(SQLException e){
System.out.print(e);
}
System.out.print(“插入成功”);
pre.close();
testcon.close();
}
public void update() throws SQLException{
总结
面试前的“练手”还是很重要的,所以开始面试之前一定要准备好啊,不然也是耽搁面试官和自己的时间。
我自己是刷了不少面试题的,所以在面试过程中才能够做到心中有数,基本上会清楚面试过程中会问到哪些知识点,高频题又有哪些,所以刷题是面试前期准备过程中非常重要的一点。
面试题及解析总结
大厂面试场景
知识点总结
结
[外链图片转存中…(img-dYz0YV9h-1715586602194)]
大厂面试场景
[外链图片转存中…(img-7OSxAtTC-1715586602194)]
知识点总结
[外链图片转存中…(img-aOEkzHaI-1715586602194)]