-
Notifications
You must be signed in to change notification settings - Fork 0
/
HelloWorld.java
49 lines (41 loc) · 2.13 KB
/
HelloWorld.java
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import java.io.*;
import java.util.*;
public class HelloWorld {
public static void main(String[] args)
{
System.out.println ("");
System.out.println ("--------------------------------------------------------------------------------");
System.out.println ("+++++++++++++++++++++++++++SERVECHAT-Alpha Version 1.0++++++++++++++++++++++++++");
System.out.println ("+ +");
System.out.println ("+ By-R.A™ +");
System.out.println ("+ All Rights Reserved(2017)© +");
System.out.println ("+ +");
System.out.println ("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
System.out.println ("--------------------------------------------------------------------------------");
Map<String, String> map = new HashMap<String, String>();
map.put("2206", "Rahul");
map.put("2211", "Shubham");
map.put("2709", "Yash");
map.put("1234", "Deep");
map.put("1703", "Pathak");
System.out.println ("--------------------------------------------------------------------------------");
System.out.println ("1. Login");
System.out.println ("2. Exit");
System.out.println ("--------------------------------------------------------------------------------");
String gender; //the gender of the user
Scanner scanner = new Scanner(System.in); //text input scanner
System.out.println("\nAre you male or female? (format: M or F)");
gender = scanner.next();
System.out.println(gender); //an output line for debugging
if (gender == "F ")
{
gender = "Male";
}
else
{
gender = "Female";
}
System.out.println("\nYou said you are:");
System.out.println(gender);
}
}