Run ❯
Get your
own Java
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
public class Main { public static void main(String[] args) { // Student data String studentName = "John Doe"; int studentID = 15; int studentAge = 23; float studentFee = 75.25f; char studentGrade = 'B'; // Print variables System.out.println("Student name: " + studentName); System.out.println("Student id: " + studentID); System.out.println("Student age: " + studentAge); System.out.println("Student fee: " + studentFee); System.out.println("Student grade: " + studentGrade); } }
Student name: John Doe
Student id: 15
Student age: 23
Student fee: 75.25
Student grade: B