-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser_constructor.java
More file actions
32 lines (32 loc) · 857 Bytes
/
Copy pathUser_constructor.java
File metadata and controls
32 lines (32 loc) · 857 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
import java.util.*;
public class User_constructor {
String name;
int pan;
String add;
double minbal=5000;
user_con(){
System.out.println("Welcome to SBI");
System.out.println("Initial balance: 5000" );
}
void input(){
Scanner sc=new Scanner(System.in);
System.out.println("Enter Name: ");
name=sc.nextLine();
System.out.println("Enter pan number");
pan=sc.nextInt();
System.out.println("Enter address");
add=sc.nextLine();
}
void display(){
System.out.println("Name: "+name);
System.out.println("Pan no: "+pan);
System.out.println("Address: "+add);
}
public static void main(String []args){
User_constructor ob=new User_constructor();
ob.input();
ob.display();
}
}
//Shashwat Dwivedi
//62