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 5 of 5

Thread: actual and formal lists differ in length

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy actual and formal lists differ in length

    Hi everyone . I am Aparna , a student of MCA. I am giving u the following code in which i m getting the error
    no suitable method found for println(String,int)
    method printstream.println(object )is not applicable. actual and formal parameters differ in length.
    System.out.println("i:",+i);.

    My code is as follows :

    import java.io.*;
    class breakdemo
    {
    public static void main(String args[])
    {
    for (int i=0;i<50;i++)
    {
    if(i==5)break;
    System.out.println("i:",+i);
    }
    System.out.println("Loop complete");
    }
    }
    Your help will be highly appreciated . Thanks


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,650
    Thanks
    25
    Thanked 325 Times in 302 Posts

    Default Re: actual and formal lists differ in length

    Take out the comma in your println() statement.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  3. #3
    Junior Member psabbate's Avatar
    Join Date
    Aug 2012
    Posts
    20
    My Mood
    Amused
    Thanks
    0
    Thanked 5 Times in 4 Posts

    Default Re: actual and formal lists differ in length

    But that's a compilation error, right? What IDE are you using??
    Everyone wants to go to heaven ... but nobody wants to die

    Nissi Group, Servicios IT,
    Diseņo Web, Desarrollo de Software, SEO,
    LinkedIn

  4. #4
    Junior Member
    Join Date
    Aug 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: actual and formal lists differ in length

    remove comma

  5. #5
    Junior Member
    Join Date
    Aug 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: actual and formal lists differ in length

    Thanks a lot . My problem is solved . Thanks

Similar Threads

  1. ...differ in length error; homework starter code not working.
    By mwebb in forum What's Wrong With My Code?
    Replies: 2
    Last Post: December 10th, 2011, 11:20 AM
  2. Replies: 2
    Last Post: September 14th, 2011, 11:58 PM
  3. Actual and Formal Parameters
    By mikec2500 in forum Object Oriented Programming
    Replies: 4
    Last Post: February 10th, 2011, 07:48 AM
  4. formal and actual parameters
    By gemma in forum Java Theory & Questions
    Replies: 3
    Last Post: December 7th, 2010, 10:14 AM
  5. Actual and formal parameters
    By javanoobie in forum Java Theory & Questions
    Replies: 4
    Last Post: December 5th, 2010, 07:29 AM

Tags for this Thread