Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public class Piste {
  2.  
  3. public int x;
  4. public int y;
  5.  
  6. public void tulostsaArvot() {
  7. System.out.println("x")
  8. System.out.println("y")
  9. }
  10. }
  11.  
  12. public class Sovellus {
  13. public static void main(String args[]) {
  14. Piste origo = new Piste();
  15. Piste origo2 = origo;
  16.  
  17. origo.x = 5;
  18. origo.y = 7;
  19.  
  20. System.out.println(origo2.x);
  21. System.out.println(origo2.y);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement