W3School TIY Editor

  • W3School 在线教程
  • 改变方向
  • 暗黑模式
 
public class Main {
  public static void main(String[] args) {
    // 学生数据
    String studentName = "Bill Gates";
    int studentID = 15;
    int studentAge = 23;
    float studentFee = 75.25f;
    char studentGrade = 'B';
    
    // 打印变量
    System.out.println("学生姓名: " + studentName);
    System.out.println("学号: " + studentID);
    System.out.println("年龄: " + studentAge);
    System.out.println("学费: " + studentFee);
    System.out.println("成绩等级: " + studentGrade);
  }
}