-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdmin.java
More file actions
30 lines (24 loc) · 961 Bytes
/
Admin.java
File metadata and controls
30 lines (24 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package recruitmentmanagement;
import java.util.*;
class Admin {
private String username;
private String password;
Scanner s = new Scanner(System.in);
boolean login() {
final String Username = "Admin";// Admin ka username constant kia hai ye
final String Password = "123456";// Admin ka password constant kia hai ye
System.out.println("Login to access Admin console of Recruitment System\n");
System.out.println("-Sign in-\n");
System.out.println("Enter Username :");
username = s.nextLine();
System.out.println("Enter Password :");
password = s.nextLine();
if (username.equals(Username) && password.equals(Password)) {
System.out.println("\nAccess granted \nWelcome to admin console of Recruitment Department\n");
return true;
} else {
System.out.println("Invalid Credentials");
return false;
}
}
}