Java Real-Life
Java Variables
Example 1
Here is an example of a // Student data
program that stores different String studentName = "John Doe";
data about a high school int studentID = 15;
int studentAge = 23;
student float studentFee = 75.25f;
char studentGrade = 'B’;
Copy the code – try it!
// Print variables
[Link]("Student name: " + studentName);
[Link]("Student id: " + studentID);
[Link]("Student age: " + studentAge);
[Link]("Student fee: " + studentFee);
[Link]("Student grade: " + studentGrade);
STEM