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: Hello to all!!!

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

    Default Hello to all!!!

    Can one tell me what is wrong with my code and what it is that is supposed to do?




      String words[] = {"algorithm", "boolean", "char", "double"}; 
     
    for (int i = 0; i < words.length/2; i++) 
    { 
        String temp = words[i]; 
        words[i] = words[words.length - 1 - i]; 
        words[words.length - 1 - i] = temp; 
    }
    Last edited by Norm; November 24th, 2013 at 03:38 PM. Reason: remove spaces in code tag

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,916
    Thanks
    55
    Thanked 2,351 Times in 2,322 Posts

    Default Re: Hello to all!!!

    what is wrong with my code
    Please explain why you think there is something wrong with the code.

    what it is that is supposed to do?
    Can you ask the author of the code that question?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,097
    My Mood
    Mellow
    Thanks
    244
    Thanked 754 Times in 740 Posts

    Default Re: Hello to all!!!

    Welcome! Please give your threads appropriate titles. This one might be, "Please explain this code to me."