Advertisement
cgorrillaha

Untitled

Nov 11th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. package basicOOP;
  2.  
  3. public class DoThings {
  4.  
  5.     public int doIt(int x, int y){
  6.         return x*y;
  7.     }
  8.  
  9.     public String thatThing(String x,int y){
  10.         return x+y;
  11.     }
  12.  
  13.     public void product(int max){
  14.         int product=1;
  15.         for(int i=1; i<max; i++){
  16.             product*=i;
  17.         }
  18.         System.out.println(product);
  19.     }
  20.  
  21.     public double calcs(double d1, int i1){
  22.         return 0.0;
  23.     }
  24.     public String hello(String s){
  25.        
  26.     }
  27.    
  28.    
  29.     public static void main(String[] args) {
  30.         DoThings doIt=new DoThings();
  31.         int var1=doIt.doIt(4,6);
  32.         String s=doIt.thatThing("Hello", 15);
  33.         doIt.product(5);
  34.         double calcs=doIt.calcs(3.4,7);
  35.        
  36.         String s1=doIt.hello("World");
  37.     }
  38.  
  39. }
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement