-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatacollection.java
More file actions
31 lines (30 loc) · 964 Bytes
/
Copy pathdatacollection.java
File metadata and controls
31 lines (30 loc) · 964 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
import java.util.Scanner;
public abstract class datacollection {
public static void main(String[] args){
String name;
int age;
String college;
float cgpa;
String discipline;
Scanner scanner=new Scanner(System.in);
System.out.print("Enter name : ");
name=scanner.nextLine();
System.out.print("Enter age : ");
age=scanner.nextInt();
System.out.print("Enter cgpa : ");
cgpa=scanner.nextFloat();
scanner.nextLine();
System.out.print("Enter college : ");
college=scanner.nextLine();
System.out.print("Enter discipline/branch : ");
discipline=scanner.nextLine();
System.out.println("Verify your details ");
System.out.println("Name : "+name);
System.out.println("Age : " +age);
System.out.println("CGPA : "+cgpa);
System.out.println("College : "+college);
System.out.println("Branch : "+discipline);
System.out.print("College : "+college);
scanner.close();
}
}