-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployeeDetails.java
More file actions
28 lines (24 loc) · 842 Bytes
/
Copy pathEmployeeDetails.java
File metadata and controls
28 lines (24 loc) · 842 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
import java.util.Scanner;
public class EmployeeDetails {
public static void main(String[] args){
String name;
int age;
long phonenumber;
float salary;
String department;
char gender;
Scanner sc = new Scanner(System.in);
name = sc.nextLine();
age = sc.nextInt();
phonenumber = sc.nextLong();
salary = sc.nextFloat();
department = sc.next();
gender = sc.next().charAt(0);
System.out.println("The name is : " + name );
System.out.println("The age is :" + age);
System.out.println("The PhoneNumber is:" + phonenumber);
System.out.println("The salary is :" + salary);
System.out.println("The department is : " + department);
System.out.println("The gender is : " + gender);
}
}