class StaticMem {
static int num;
static disp() {
print("The value of num is ${StaticMem.num}") ;
}
}
void main() {
StaticMem.num = 12;
// initialize the static variable }
StaticMem.disp();
// invoke the static method
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266202.html