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.


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

Results 1 to 3 of 3

Thread: HELP array cmdline argument

  1. #1
    Junior Member eummm's Avatar
    Join Date
    Nov 2010
    Thanked 0 Times in 0 Posts

    Smile HELP array cmdline argument

    Can any one help me plz
    for school i have to make the following program with arrays command-line argument
    The program must ask me the number of days and show me the date as result
    This is the result of the program as shown under
    tnx every one
    java Days 123
    day 123 is 3 May

    java Days 365
    day 365 is 31 December
    java Days 1
    Day 1 is 1 january

  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Thanked 619 Times in 561 Posts
    Blog Entries

    Default Re: HELP array cmdline argument

    What have you done so far? We won't do your homework for you, please post your thoughts/code and tell us what part you're having problems with and we'll be happy to help you.

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    United Kingdom
    My Mood
    Thanked 294 Times in 227 Posts
    Blog Entries

    Default Re: HELP array cmdline argument

    You can take user input using the Scanner class:


    Take a look at our Code Snippets forum - Java Code Snippets and Tutorials - Java Programming Forums

    There are other examples there which may help you.

    Please post what you have done so far and we can take it from there...
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. prininting out a 4x4 array according to an order by a 1d array
    By fortune2k in forum Collections and Generics
    Replies: 7
    Last Post: November 25th, 2010, 12:54 PM
  2. 2d (4x4) array insdie a 1d array. (Block cipher)
    By fortune2k in forum Collections and Generics
    Replies: 13
    Last Post: November 23rd, 2010, 05:29 PM
  3. Generic method using an int[] argument
    By dubois.ford in forum Collections and Generics
    Replies: 2
    Last Post: March 18th, 2010, 07:18 AM
  4. [SOLVED] Command Line Argument Help
    By EmSaint in forum Loops & Control Statements
    Replies: 2
    Last Post: January 28th, 2010, 10:55 AM
  5. he operator / is undefined for the argument type(s) String, int
    By mtbr00x in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: September 8th, 2009, 08:34 PM