java Project like admin | admin opertion in java | HashMap learn | what is HashMap in java | Java projects | mini projects
Java Projects Like Admin:
I will explain the details of the projects this project will make methods are should be find the your student are admin . i am use the HashMap class in this project
That is Code of the Project :
import java.util.*;
class demo
{
public static void main(String[] args)
{
HashMap<String,String> database = new HashMap<String,String>();
Scanner sc = new Scanner(System.in);
String pass = "pass";
System.out.println("enter Your RollNo :");
String RollNo = sc.next();
System.out.println("enter Your Name :");
String Name = sc.next();
database.put(RollNo, Name);
System.out.println("Your Details Stored Succesfully....");
System.out.println("--------------------------------------");
System.out.println("1.Admin");
System.out.println("2.Student");
int choose = sc.nextInt();
if(choose == 1)
{
System.out.println("Enter the Password : ");
String choice = sc.next();
if(choice.compareTo(choice) == 0)
{
for(Map.Entry m : database.entrySet())
{
System.out.println(m.getKey()+" . "+m.getValue());
}
System.out.println("Thats all");
}
else
{
System.out.println("Incorrect...");
}
}
else
{
System.out.println("Sorry Your Not Your Student Your Not See the Student datas");
}
}
}
Please Support my blog ......
Thank You
Comments
Post a Comment