Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- import javax.swing.*;
- public class programma {
- public static void main(String[] args) throws ClassNotFoundException, SQLException {
- Class.forName("org.postgresql.Driver");
- String url = "jdbc:postgresql:esercitazione";
- String username = "postgres";
- String password = "esame";
- Connection conn = DriverManager.getConnection(url,username,password);
- boolean stop = false;
- while(!stop){
- String choice = JOptionPane.showInputDialog("Inserisci un numero tra 1 e 4");
- if(choice != "1" || choice != "2" || choice != "3" || choice != "4")
- JOptionPane.showMessageDialog(null, "Inserire un numero tra 1 e 4");
- else{
- int c = Integer.parseInt(choice);
- switch(c){
- case 1:
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement