day08-静态static关键字修饰成员变量

This commit is contained in:
2026-05-16 15:27:25 +08:00
parent 76461a9b21
commit b36603b570
2 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package com.inmind.static02;
public class Student {
//属性(成员变量)
String name;
int age;
//静态变量
static String clazz;
public Student() {
}
public Student(String name, int age) {
this.name = name;
this.age = age;
}
}