0
I found a Java work. In which I have to save the data on the server ...
I wanna use wamp server .can anybody help me to connect wamp server and Neatbeans...its a semester project ..urgent to submit😑
2 Respuestas
+ 3
Bint E Zahra hi,
To connect Java and MySQL in wamp or xampp first you have to write the connection code for server end and the front end which is done by this way.
import java.sql.Connection;
import java.sql.DriverManager;
public class DB {
public static Connection getConnection(){
Connection con=null;
try{
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","","");
}catch(Exception e){System.out.println(e);}
return con;
}
}
If you have any further query ping me
Have these 🍎 🍎 🍎 🍎 🍎
0
DishaAhuja THANK U DEAR U MADE MY DAY.I WILL ASK later😊