-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathProgram4.java
More file actions
33 lines (30 loc) · 774 Bytes
/
Copy pathProgram4.java
File metadata and controls
33 lines (30 loc) · 774 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
/*
* Learning outcomes
* variable declaration
* variable initalization
* dynamic initialization
* data types
*/
public class Program4 {
public static void main(String[] args) {
// declaring variables for a student
String name;
int id, age;
double gpa;
boolean isRegisted;
// initializing variables for a student
name = "Anisul Islam";
id = 1302020017;
age = 25;
gpa = 3.92;
isRegisted = true;
// printing variables
System.out.println("Student Information");
System.out.println("--------------------");
System.out.println("Name: "+name);
System.out.println("ID: "+id);
System.out.println("Age: "+age);
System.out.println("GPA: "+gpa);
System.out.println("Registered: "+isRegisted);
}
}