Download the JDK and install and modify the environment variables.
D:\java\worktool\jdk1.8.0_171
C:\Program Files (x86) \common Files\oracle\java\javapath;%systemroot%\system32;%systemroot%;%systemroot%\system32 \wbem;%systemroot%\system32\windowspowershell\v1.0\;%java_home%/bin
View the Java version and path after the environment configuration
Code Writing
public class hello{
/*
Program entry
/
public static void main{string[] arg}
{
System.out.println ("Hello World");
}
}
Practice of Database programming
Import java.sql.*;
public class update{
public static void Update (int catno,int empNo)
Throw sqlexception{
Connection Con=null;
PreparedStatement Psmt=null;
try{
Con=drivermanger.getconnection ("Jdbc:default:connection");
Psmt=con.preparedstatement ("UPDATE EMPLOYEES" + "SET car_number=?") + "WHERE");
Psmt.setint (1,carno);
Psmt.setint (2,empno);
Psmt.executeupdate ();
}
finally{
If{psmt!=null}
Psmt.close ();
}
Connection Con=null;
}
}
Evening plan more contact socket exercises, as well as database connection exercises
Come on, old iron.
First day of basic Java learning