Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Illegal start of expression error

1002412Apr 11 2013 — edited Apr 13 2013
class Test1
{
public static void main(String args[])
{
void show()
{
System.out.print("its working");
}
show();
}
}
When i compile this program i find the error illegal start of expression
^void show
Test1.java5 ';' is expected
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2013
Added on Apr 11 2013
6 comments
303 views