aquaballoon

Java - Method with arguments

Jul 14th, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. =======================> Method without arguments
  2.  
  3. public class Add {
  4.     void addTwo(){  
  5.         System.out.println("Total is ");
  6.     }
  7. }
  8.  
  9.  
  10. =======================> Method with arguments
  11.  
  12. public class Add {
  13.     String addTwo(String first, String second){  
  14.         return first + second;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment