Advertisement
RickRez

getterwithparameter

Dec 14th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. class test{
  2.  
  3.   String result;
  4.   double coba;
  5.   static double angka = 200;
  6.  
  7.     public static void main(String[] args) {
  8.         test p = new test();
  9.         String m = p.time(angka);
  10.         double dam = p.nesws(angka);
  11.         System.out.println(m + " " +dam);
  12.     }
  13.  
  14.  
  15.     public String time(double j){
  16.         return result = String.valueOf(j/20);
  17.     }
  18.  
  19.     public double nesws(double l){
  20.         for(double i=0; i<5; i++){
  21.             l = l+2;
  22.              coba = l/20;
  23.         }
  24.         return coba;
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement