Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Metodyf
- void obj()f
- System.out.println(”Metoda bez parametrow”);
- g
- void obj(double w)f
- System.out.println(”Metoda z jednym parametrem: ”+w);
- g
- double obj(double h, double d)f
- System.out.println(”Metoda z dwoma parametrami: ”+h+” i ”+d);
- return h+d;
- g
- g
- public class Metf
- public static void main(String args[ ])f
- int width=10; double height=5.5, depth=7, res;
- Metody m=new Metody();
- m.obj();
- m.obj(width);
- res=m.obj(height, depth);
- System.out.println(res);
- g
- g
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement