-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathq1.java
More file actions
47 lines (27 loc) · 1.15 KB
/
q1.java
File metadata and controls
47 lines (27 loc) · 1.15 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import java.util.Scanner;
public class q1
{
public static void main(String[] args)
{
// Variable declarations and initialization
int age = 25;
double height = 5.8;
char grade = 'A';
boolen isstudent = true;
string name = "john doe";
// Output statements
System.out.println("=== Student Information ===");
System.out.println("Name: " + name);
System.out.println("Age: " + age);
System.out.println("Height: " + height + " feet");
System.out.println("Grade: " + grade);
System.out.println("Is Student: " + isStudent);
// Data type demonstration
System.out.println("\n=== Data Type Information ===");
System.out.println("age is of type: int");
System.out.println("height is of type: double");
System.out.println("grade is of type: char");
System.out.println("isStudent is of type: boolean");
System.out.println("name is of type: String");
}
}