Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. class Metodyf
  2. void obj()f
  3. System.out.println(”Metoda bez parametrow”);
  4. g
  5. void obj(double w)f
  6. System.out.println(”Metoda z jednym parametrem: ”+w);
  7. g
  8. double obj(double h, double d)f
  9. System.out.println(”Metoda z dwoma parametrami: ”+h+” i ”+d);
  10. return h+d;
  11. g
  12. g
  13. public class Metf
  14. public static void main(String args[ ])f
  15. int width=10; double height=5.5, depth=7, res;
  16. Metody m=new Metody();
  17. m.obj();
  18. m.obj(width);
  19. res=m.obj(height, depth);
  20. System.out.println(res);
  21. g
  22. g
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement