Things you can mark as static:
■ Methods
■ Variables
■ A class nested within another class, but not within a method .
■ Initialization blocks
Things you can't mark as static:
■ Constructors (makes no sense; a constructor is used only to create instances)
■ Classes (unless they are nested)
■ Interfaces
■ Method local inner classes
■ Inner class methods and instance variables
■ Local variables
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7899089/viewspace-623531/ ,如需转载,请注明出处,否则将追究法律责任。