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.

2 Visitor Messages

  1. View Conversation
    public class AA {


    int add(int i) {
    int y = i;
    y += 20;
    System.out.println("*.y= " + y);

    if (y <= 100) {
    y +=30;
    System.out.println("**.y= " + y);
    add(y); // second call
    System.out.println("***.y= " + y);

    }else {System.out.println("*****.y= " + y);}

    System.out.println("Final Value of y : " + y);
    return y;
    }

    public static void main(String args[]) {
    AA obj = new AA();


    System.out.println("At Last x: " + obj.add(5));

    }

    }
    Could U pls clear me about the final value of x ?
Showing Visitor Messages 1 to 2 of 2
About datathinker

Basic Information

About datathinker
Biography:
Java developer and BI product designer.
Location:
Beijing, China
Interests:
Reading and Traveling
Occupation:
Developer
Java Skill Level:
Intermediate

Statistics


Total Posts
Total Posts
7
Posts Per Day
0.00
Visitor Messages
Total Messages
2
Most Recent Message
May 16th, 2014 05:46 AM
Total Thanks
Total Thanks
0
  • Thanked 0 Times in 0 Posts
General Information
Last Activity
August 22nd, 2013 10:31 PM
Join Date
July 21st, 2013

14 Friends

  1. Andrew R Andrew R is offline

    Member

    • Send a message via Skype™ to Andrew R
    Andrew R
  2. derekxec derekxec is offline

    Member

    derekxec
  3. didingnuriska didingnuriska is offline

    Junior Member

    didingnuriska
  4. Freaky Chris Freaky Chris is offline

    Senile Half-Wit

    Freaky Chris
  5. GregBrannon GregBrannon is offline

    Super Moderator

    GregBrannon
  6. hemla hemla is offline

    Member

    hemla
  7. Hz Attache Hz Attache is offline

    Junior Member

    • Send a message via Skype™ to Hz Attache
    Hz Attache
  8. jps jps is offline

    Super Moderator

    jps
  9. llowe29 llowe29 is offline

    Member

    llowe29
  10. newbie newbie is offline

    Forum Squatter

    newbie
Showing Friends 1 to 10 of 14
Page 1 of 2 12 LastLast