fork(4) download
  1. class Demo{
  2. int giValue=6;
  3. public static void main(String[] args) {
  4. // TODO Auto-generated method stub
  5. Demo obj1=new Demo();
  6. obj1.fnReverse();
  7. }
  8.  
  9. public void fnReverse(){
  10. System.out.println(" "+giValue);
  11. if(giValue>0){
  12. giValue--;
  13. fnReverse();
  14. }
  15. //System.out.println(" "+giValue);
  16. }
  17. }
Success #stdin #stdout 0.09s 320320KB
stdin
Standard input is empty
stdout
 6
 5
 4
 3
 2
 1
 0