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

Thread: Input/Output Sequence

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

    Cool Input/Output Sequence

    I am COMPLETELY New to java, and have not a clue what to do!

    These are my directions:

    Write a program that displays this name and address thusly:
    Joe Philagio
    582 Troy Street
    Birmingham, Al. 48331


    Our instructor gave us this info. to supposedly help:
    INPUT/OUTPUT:
    int. num; String animal;
    System.out.println("How many critters?:");
    num = Keyboard.readInt();
    System.out.println("What kind?:");
    animal - Keyboard.readString();
    System.out.println("You have" + num + "\t" + animal + "s.");


    Seeing that the example has nothing to do with the assignment, I have no clue how to do this! PLEASE HELP ME


  2. #2
    Junior Member
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Input/Output Sequence

    this is also REGULAR java...

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Input/Output Sequence

    The program is to print 3 lines?
    Did you compile and execute the small program you posted here?
    Start with that so you know how to edit, compile and execute a program.
    When it does execute:
    Did it print out anything?
    What statements in the program did the printing?
    You could copy those statements and change them to print out what you want to print.

  4. #4
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Input/Output Sequence

    Are you supposed to write a program to prompt the user to input the data?
    Improving the world one idiot at a time!

  5. #5
    Junior Member
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Input/Output Sequence

    Well, I don't really understand how to write it, because the example and the assignment are so different...

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Input/Output Sequence

    Did you try typing in the sample program, compiling it and executing it?

    the example and the assignment are so different...
    It looks like the assignment only uses a small part of the example program.

Similar Threads

  1. Input output file help
    By peteyfresh12 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: May 2nd, 2011, 07:44 AM
  2. [SOLVED] Need help with input/output error
    By stefan2892 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 7th, 2011, 10:44 AM
  3. [SOLVED] T_T [hellllppppp] Input/Output
    By bontet in forum File I/O & Other I/O Streams
    Replies: 9
    Last Post: October 29th, 2010, 11:32 AM
  4. Input/Output file help
    By Plural in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 25th, 2010, 08:34 PM
  5. Input/Output file help
    By Plural in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 23rd, 2010, 06:26 PM