Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Why do I get a "class expected error, when trying to pass a char ary through a parame

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Why do I get a "class expected error, when trying to pass a char ary through a parame

    printarray(ary[][], row, col);

    public void printarray(char[][] t, int o, int l){
    for(int q=0; q< t.length ;q++){
    for(int h=0; h < t[o][l].length ; h++){
    check=t[o][l];
    System.out.println(check);


  2. #2
    Member
    Join Date
    Feb 2010
    Posts
    30
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Why do I get a "class expected error, when trying to pass a char ary through a pa

    What is the rest of your code? Also can you put your code inside code brackets?

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Why do I get a "class expected error, when trying to pass a char ary through a pa

    Check that all of your code is inside of a method.

Similar Threads

  1. [SOLVED] Error: Class,interface or enum expected
    By FJIW in forum What's Wrong With My Code?
    Replies: 10
    Last Post: September 18th, 2011, 03:08 PM
  2. .'class' expected - what to do?!?! URGENT
    By Rads23 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: August 17th, 2011, 06:05 PM
  3. Replies: 7
    Last Post: August 13th, 2011, 01:22 AM
  4. Why the error said "few parameters expected 7" while i only have 6 fields?
    By Hafiz Mughni in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 9th, 2011, 10:45 AM
  5. Syntax error on token ";", @ expected after this token
    By MagicMojo in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 16th, 2011, 07:48 AM