Results 1 to 2 of 2
  1. #1
    jmcquaid1987 is offline Member
    Join Date
    Mar 2014
    Posts
    12
    Rep Power
    0

    Default Public void issues??

    public class BowlingTeam {

    public static void main(String[] args) {
    String teamName;
    String[] members = new String[4];

    public void setTeamName(String team) {
    teamName=team;
    }
    public String getTeamName() {
    return teamName;
    }

    public void setMember(int number, String name) {
    members[number]=name;
    }

    public String getMember(int number) {
    return members[number];
    }
    }
    }

    Compiler is telling me 'illegal start of expression' and ';' expected for all of these methods and I don't know why, they look correct to me. Then again, what do I know! Any suggestions would be appreciated!

  2. #2
    jmcquaid1987 is offline Member
    Join Date
    Mar 2014
    Posts
    12
    Rep Power
    0

Similar Threads

  1. public static void main(String... args)???
    By SnakeDoc in forum New To Java
    Replies: 5
    Last Post: 01-10-2013, 08:30 AM
  2. why public void clear() had error pls Help mE
    By zafri in forum New To Java
    Replies: 2
    Last Post: 10-02-2012, 10:12 AM
  3. Replies: 1
    Last Post: 12-04-2010, 05:41 PM
  4. Public static void main (String args[])
    By arefeh in forum New To Java
    Replies: 12
    Last Post: 01-28-2010, 11:58 AM
  5. calling a public void method from a class button
    By supa_kali_frajilistik in forum AWT / Swing
    Replies: 1
    Last Post: 05-21-2008, 05:40 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
  •