-
Notifications
You must be signed in to change notification settings - Fork 0
/
DataBase.java
37 lines (36 loc) · 1.53 KB
/
DataBase.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.sql.*;
public class DataBase {
Connection con=null;
PreparedStatement st;
Statement stm;
ResultSet re;
public DataBase()
{
try{
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bankserver","root","");
}
catch(Exception e){
System.out.println(e);
}
}
public void clearScreen(){
try {
if (System.getProperty("os.name").contains("Windows"))
new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
else
Runtime.getRuntime().exec("clear");
}
catch (Exception ex)
{
System.out.println(ex);
}
System.out.println("============================================================================");
System.out.println("*************************** JAVA PROJECT ****************************");
System.out.println("****************** ON *******************");
System.out.println("************************* BANKING SYSTEM ***********************");
System.out.println("****************** BY *******************");
System.out.println("*************** KAKUMANI MANOHAR **************");
System.out.println("============================================================================\n");
}
}