File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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: 2398
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!