trace this java method
Posted
by Bader
on Stack Overflow
See other posts from Stack Overflow
or by Bader
Published on 2010-03-21T09:51:54Z
Indexed on
2010/03/21
10:01 UTC
Read the original article
Hit count: 336
java
public static int ABC(int x, int y)
{
if(y==0)
return(0);
else
return(x + ABC(x,y-1));
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(ABC(5,3));
}
© Stack Overflow or respective owner