Advertisement
zoro-10

Pr1c.java

Mar 30th, 2024
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. class S_Method {
  2.  
  3.   public static int add(int a, int b) {
  4.     return a + b;
  5.   }
  6.  
  7.   public static int sub(int a, int b) {
  8.     return a - b;
  9.   }
  10. }
  11.  
  12. public class Pr1c {
  13.  
  14.   public static void main(String args[]) {
  15.     System.out.println("Sum: " + S_Method.add(8, 4));
  16.     System.out.println("Difference: " + S_Method.sub(18, 12));
  17.   }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement