Results 1 to 9 of 9
  1. #1
    Harmesh Goyal is offline Member
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Default can anyone check my code?

    class Create
    {
    public static char main(String[] aa);
    char[] s;
    {
    char[] s;
    s= new char[26];
    for(int i=0; i<26; i++)
    {
    s[i]= (char) ('A' + i);
    }
    return s;
    }
    }
    }

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,305
    Blog Entries
    7
    Rep Power
    20

    Default

    Is this an announcement? The code just doesn't compile ...

    kind regards,

    Jos

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Thread moved from Announcements to New to Java section for closer topic alignment.

  5. #5
    Harmesh Goyal is offline Member
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Default

    this code is having compile time errors...

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,305
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Harmesh Goyal View Post
    this code is having compile time errors...
    Just think: how is a main( ... ) method defined (as a matter of fact that counts for every method definition). Try to find an example of a correct definition and compare it with your own definition. Pay attention, every curly bracket and semicolon counts ...

    kind regards,

    Jos

  7. #7
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    I started to respond in detail, but the more I looked at it, the more it looked to me like a "find the errors in this code" classroom exercise. Do your own homework -- it's the only way to learn.

    -Gary-

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,259
    Rep Power
    25

    Default

    If you have errors in the code and have questions about them, copy the FULL text of the error messages here with your questions.

  9. #9
    berkeleybross's Avatar
    berkeleybross is offline Senior Member
    Join Date
    Feb 2010
    Location
    England
    Posts
    187
    Rep Power
    5

Similar Threads

  1. can somebody check my code
    By raven in forum New To Java
    Replies: 2
    Last Post: 08-29-2010, 08:55 PM
  2. Pls check why my code is giving a runtime error
    By Beginner in forum New To Java
    Replies: 3
    Last Post: 05-26-2010, 12:32 AM
  3. pls check it
    By aRTx in forum New To Java
    Replies: 0
    Last Post: 03-24-2009, 02:35 PM
  4. Plz Some one check my code
    By TamTam in forum AWT / Swing
    Replies: 1
    Last Post: 02-07-2009, 11:24 PM
  5. Can someone check my code
    By joz_12345 in forum Java 2D
    Replies: 7
    Last Post: 02-18-2008, 02:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •