Advertisement
NB52053

Akash_Sir_Lab

Jul 17th, 2017
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. public class Solution {
  2.  
  3.   public static void main (String [] args ){
  4.  
  5.     int a = 10 ;
  6.     int b;   //Delete
  7.  
  8.     System.out.println("Before modificatoin:"+a);
  9.    
  10.     fun(a);
  11.     b = a;  // Delete
  12.     b = b+10; //Delete
  13.     System.out.println("After modificatoin: A"+a);
  14.     System.out.println("After modificatoin: B"+b); //Delete
  15.    
  16.   }
  17.  
  18.   static void fun(int a){
  19.  
  20.     a+=10;
  21.     System.out.println("Modified: "+a);
  22.  
  23.   }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement