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: Please help! Noob java user here

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

    Post Please help! Noob java user here

    I'm trying to make a code that is a little over my knowledge but I'm trying. Anyways, here's what I have to do:

    -Use string concatenation to obtain the user’s full name.

    -Compare the length of the first and last name and if they are the same print:
    “Hello First Last”
    “Your first and last name have both n letters”
    where First and Last are the first name and last name, and n is the length of these names.

    -If the first and last name are of different size, print:
    “Hello First Last”
    “ The length of your first name is: n”
    “ The length of your last name is: m”
    where First and Last are the first name and last name, and n and m are the lengths of these names.

    -Create a loop to print a table with all the characters in the user’s full name and their corresponding ASCII value. You may use the charAt() method of the String class to identify each of the characters in the full name and type cast them as int to obtain their ASCII value.

    -Print out the user’s age with the format shown in the example below.

    -Print out the year the user was born with the format shown in the example below. This year is obtained by subtracting the age from the current year.

    -Using increment, increase the age by one and create the output shown in the example below.

    -Using compound assignment operators, increase the age by 4 more and create the output shown in the example below.

    So far, I've gotten the easy stuff done already but I'm stuck with the rest of it.

    Please help!!!


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Please help! Noob java user here

    Please see the link in my signature entitled getting help, as well as the following:
    http://www.javaprogrammingforums.com...e-posting.html

  3. #3
    Member
    Join Date
    Oct 2011
    Posts
    40
    My Mood
    Stressed
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: Please help! Noob java user here

    How about posting what you already have so we don't have to start from scratch? It will be way easier to help you edit your own code than writing it from scratch ourselves.

    Also a few places you say "see output below" but gave us nothing.

  4. #4
    Member
    Join Date
    Jun 2011
    Posts
    182
    My Mood
    Where
    Thanks
    15
    Thanked 8 Times in 8 Posts

    Default Re: Please help! Noob java user here

    Pretty much everything you need to do is in the Java API.

    That is the beauty of Java. Use it.

Similar Threads

  1. [SOLVED] Java Noob: Coin Toss Simulator (no GUI)
    By bgroenks96 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: June 4th, 2011, 10:28 PM
  2. [SOLVED] Java Noob, Jframe in Applet.
    By rLLZORS in forum AWT / Java Swing
    Replies: 2
    Last Post: May 5th, 2011, 10:42 AM
  3. Noob that needs some clearing up with Java style programming
    By looneylu in forum Java Theory & Questions
    Replies: 3
    Last Post: January 23rd, 2011, 11:27 PM
  4. New Java user ActionListener question
    By VBGuy in forum What's Wrong With My Code?
    Replies: 7
    Last Post: July 20th, 2010, 09:46 PM
  5. Need Help with my hmwk! Java noob!
    By ravij in forum Loops & Control Statements
    Replies: 4
    Last Post: October 7th, 2009, 01:02 AM