-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexp3a.java
More file actions
33 lines (33 loc) · 833 Bytes
/
exp3a.java
File metadata and controls
33 lines (33 loc) · 833 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
31
32
33
import java.io.*;
import java.util.Scanner;
public class Main
{
String name,teacher;
String roll,batch;
void read()
{
System.out.println("NAME: Saachi Kokate \n ROLL NO : 50 \n BATCH : S13");
Scanner sc = new Scanner(System.in);
System.out.println("Name of the student : ");
name=sc.nextLine();
System.out.println("Enter the roll no. of the student : ");
roll=sc.nextLine();
System.out.println("Enter batch of the student : ");
batch=sc.nextLine();
System.out.println("Enter the teachers name : ");
teacher=sc.nextLine();
}
void display()
{
System.out.println("Student Name : "+name);
System.out.println("Roll no. : "+roll);
System.out.println("Batch : "+batch);
System.out.println("Teachers Name: "+teacher);
}
public static void main(String args[])
{
Main sc=new Main();
sc.read();
sc.display();
}
}