By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,640 Members | 1,480 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,640 IT Pros & Developers. It's quick & easy.

Error in code: <identifier>expected & return type required

P: 1
Expand|Select|Wrap|Line Numbers
  1. public class greatest
  2. {
  3.     public Static void main (String args[])
  4.     {
  5.         int a,b,c;
  6.         a=10;
  7.         b=20;
  8.         c=15;
  9.         if(a>b&&b>c)
  10.         {
  11.         System.out.println("a is greatest number");
  12.         }
  13.         else if(b>a&&b>c)
  14.         {
  15.         System.out.println("b is greatest number");
  16.         }
  17.         else
  18.         {
  19.         System.out.println("c is greatest number");
  20.         }
  21.     }
  22. }
Jan 13 '13 #1

✓ answered by Anas Mosaad

Statis should be small letters (i.e. static)
Expand|Select|Wrap|Line Numbers
  1.     public static void main (String args[])
  2.  

Share this Question
Share on Google+
2 Replies


100+
P: 185
Statis should be small letters (i.e. static)
Expand|Select|Wrap|Line Numbers
  1.     public static void main (String args[])
  2.  
Jan 14 '13 #2

100+
P: 185
Please try to use an IDE with syntax highlighting like eclipse. It will greatly help you saving much time resolving such issues.
Jan 17 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.