This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes illegal start of expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "illegal start of expression" Watch "illegal start of expression" New topic

illegal start of expression

prashantK Singh

Joined: Sep 11, 2006
Posts: 19

class s
public static void main(String[] a){
static int i;

why this is showing illegal start of expression
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
The keyword static cannot be applied to local variables.
I agree. Here's the link:
subject: illegal start of expression
It's not a secret anymore!