26

深度分析:Java 静态方法/变量,非静态方法/变量的区别,今天一并帮你解决!-前程有光...

 3 years ago
source link: https://blog.51cto.com/14801695/2493438
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
静态/非静态方法/变量的写法大家应该都明白静态方法/字段比普通方法/字段的写法要多一个static关键字,简单写下他们的写法吧,了解的可以直接略过classTest{//静态变量publicstaticintid=1;//普通变量publicintusualId=2;//静态常量publicstaticfinalintfinalNextId=3;//静态方法publicstaticvoidA(){

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK