java中的final,const和static变量有什么区别,请使用代码示例
class X
{
static int s; // can be accessed as X.s without object
final int f = 7; // can't be assigned a different value
const int c; // doesn't compile
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.