当前位置:Gxlcms > mysql > jsp计数器-bean文件_MySQL

jsp计数器-bean文件_MySQL

时间:2021-07-01 10:21:17 帮助过:25人阅读

计数器

  import java.io.Serializable;

public class Counter implements Serializable{

// Initialize the bean on creation
int count = 0;

// Parameterless Constructor
public Counter() {

}

// Property Getter
public int getCount() {

// Increment the count property, with every request
count++;

return this.count;
}

// Property Setter
public void setCount(int count) {

this.count = count;
}
}

人气教程排行