SHARE
TWEET

Untitled

a guest Oct 15th, 2019 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top