Just a quick fix.

Instead of:

Connection con = null;
 
String url = "jdbc:mysql://localhost:3306/mysql";
String user = "user";
String password = "password";
con = DriverManager.getConnection(url, user, password);

You should have:

Connection con = null;
 
String url = "jdbc:mysql://localhost:3306/mysql";
String user = "user";
String password = "password";
 
try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch (Exception ex) {
    System.err.println(ex.getMessage());
}
con = DriverManager.getConnection(url, user, password);

Continue reading

I had to write this application as a university project.

The task was to generate a word ladder, which starts and ends on provided words. Both words have to be in a dictionary.

Every single step in the ladder must only differ in one character from the word before. The aim of the word-ladder is to find the shortest path from start word to end word in the whole graph.

Continue reading