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

Thread: NEED SOME HELP

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

    Default NEED SOME HELP

    Ok im writing a program in java thats suppose to Use a while loop, to print the lower case alphabeth and its corresponding ascii values
    of the upper case alphabeth from Z to A

    So far i came up with

    while

    (counter +32) (char) (counter +32)

    if (counter < ?)
    break;

    i just need a little bit of help pointing me in the right direction

  2. #2
    Junior Member
    Join Date
    Aug 2010
    Location
    UK
    Posts
    19
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: NEED SOME HELP

    -Do you have to use a while?
    -If so, think about a condition that when encountered will stop the loop (a certain number reached, a specific value)
    -Is there a way in Java to convert a character to it's Ascii value?
    -if not then you'll have to find a way of linking one value (the character) to another value (the Ascii)


    Just some pointers to get you searching in the right direction. As tempting as it is to just spoon feed you the code, this approach is a lot more worth while in the long term for a budding programmer (in my own experience anyway).

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,262
    Thanks
    56
    Thanked 2,372 Times in 2,343 Posts

    Default Re: NEED SOME HELP

    Have you tried creating a java program and compiling it to see what the compiler thinks of your code?

    What you have posted makes no sense to me.