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

Thread: Java Class Excercise (Related to Strings + Cmd Line Arguments)

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Location
    California, Bay Area
    Posts
    12
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Java Class Excercise (Related to Strings + Cmd Line Arguments)

    *******PROBLEM HAS BEEN SOLVED**********


    Hello All!, Nice to meet you I'm Wylie Wong

    The day before yesterday, we were assigned a class exercise and i landed on a dead end.

    PROGRAM EXCERCISE 3
    program will receive two cmd line arguments.
    a) Do they match? ( e.g Line Yes <--- Line is 4 letters therefore they do not match )
    b) if not, which one is longer?

    I've figured out how to answer a) as you will see in my code. But I am stuck on b. Any advice on how to finish this beginner excercise problem?


    Java Code Excercise 3.jpg
    Last edited by Wwong3333; September 19th, 2012 at 01:42 PM.
    work hard, play hard.


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Java Class Excercise (Related to Strings + Cmd Line Arguments)

    Post your code and we can have a look to see where you are stuck. Don't forget [code=java] before your code and [/code] after your code.

  3. The Following User Says Thank You to jps For This Useful Post:

    Wwong3333 (September 19th, 2012)

  4. #3
    Junior Member
    Join Date
    Sep 2012
    Location
    California, Bay Area
    Posts
    12
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: Java Class Excercise (Related to Strings + Cmd Line Arguments)

    Quote Originally Posted by jps View Post
    Post your code and we can have a look to see where you are stuck. Don't forget [code=java] before your code and [/code] after your code.
    I put a image on my thread, and that's my code. I tried putting [code=java] before my code and [/code] after my code but the jpg wouldn't show. Thanks for the reply! However, I solved the problem already but i still appreciate your help.
    work hard, play hard.

  5. #4
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Java Class Excercise (Related to Strings + Cmd Line Arguments)

    Using the code tags works for copy-pasting text rather than a screen shot of the code.
    Many times people like to copy-paste your code to their computer, possibly to run a test and see what it does, and not many are going to retype your code from a picture.
    Glad you got it working

Similar Threads

  1. How to check for shortage of command line arguments
    By IHeartProgramming in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 16th, 2012, 12:00 AM
  2. command line arguments
    By rizla in forum Member Introductions
    Replies: 3
    Last Post: December 12th, 2010, 11:14 PM
  3. Multi-Valued Command Line Arguments
    By joey86 in forum Java Theory & Questions
    Replies: 1
    Last Post: December 29th, 2009, 11:19 AM
  4. How to Send command line arguments in Eclipse?
    By JavaPF in forum Java JDK & IDE Tutorials
    Replies: 0
    Last Post: April 23rd, 2009, 11:37 AM
  5. How to Send command line arguments in Eclipse?
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: April 23rd, 2009, 11:37 AM