Advertisement
Guest User

My first attempt at Java

a guest
Nov 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.25 KB | None | 0 0
  1. class Tester
  2. {
  3.   public static void main(String[] args)
  4.   {
  5.     Calculation calc = new Calculation();
  6.     System.out.print(calc.addition(2,7));
  7.   }
  8. }
  9. class Calculation
  10. {
  11.     int addition(int a, int b)
  12.     {
  13.         return a + b;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement