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.02
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

15 Friends

  1. newbie newbie is offline

    Forum Squatter

    newbie
  2. Norm Norm is offline

    Super Moderator

    Norm
  3. switcha switcha is offline

    Junior Member

    switcha
  4. syedbhai syedbhai is offline

    Member

    syedbhai
  5. thenick thenick is offline

    Junior Member

    thenick
Showing Friends 11 to 15 of 15
Page 2 of 2 FirstFirst 12