Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. public static void main(String[] args) {
  2. try {
  3. inLine = new BufferedReader(new InputStreamReader(System.in));
  4. Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
  5. minConnection = DriverManager.getConnection
  6. ("jdbc:sqlserver://localhost\\SQLEXPRESS;databaseName=AnebyBank;user=sa;password=majlodj1;");
  7. stmt = minConnection.createStatement();
  8.  
  9. System.out.println("Indtast ");
  10. System.out.println("1 for Opgave 1 ");
  11. String in=inLine.readLine();
  12. switch (in)
  13. {case "1" : {System.out.println("Mr.Perv in da mix");;break;}
  14. default : System.out.println("ukendt indtastning");
  15. }
  16. }
  17. catch (Exception e) {
  18. System.out.println("fejl: "+e.getMessage());
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement