Solved:
Connection conn = DriverManager.getConnection("jdbc:sqlserver://localhost\\MALIKUSMANNAWAZ:1433;databaseName=ali","sa","dbase");
System.out.println("connection created");
Statement st=conn.createStatement();
String sql="select * from Login_System";