aspose file tools
The moose likes Beginning Java and the fly likes static variable inside static function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "static variable inside static function" Watch "static variable inside static function" New topic

static variable inside static function

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
can i declare static variable inside a static function if not
Tony Alicea

Joined: Jan 30, 2000
Posts: 3222
No. Methods cannot declare static variables. Any local variables defined inside the static method will be static by context.

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
It is sorta covered in the JavaRanch Style Guide.
subject: static variable inside static function