-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathq1.java
More file actions
29 lines (24 loc) · 921 Bytes
/
q1.java
File metadata and controls
29 lines (24 loc) · 921 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
// Mayank Yadav
import java.util.Scanner;
public class q1 {
public static void main(String[] args) {
String n = "John Doe";
int a = 25;
double h = 5.8;
char g = 'A';
boolean isStudent = true;
System.out.println("=== Student Information ===");
System.out.println("Name: " + n);
System.out.println("Age: " + a);
System.out.println("Height: " + h + " feet");
System.out.println("Grade: " + g);
System.out.println("Is Student: " + isStudent);
System.out.println();
System.out.println("=== 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");
}
}