Created
March 17, 2011 01:12
-
-
Save fboiton/873675 to your computer and use it in GitHub Desktop.
simple objects testing with java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class jugador{ | |
int puntos; | |
} | |
class hw | |
{ | |
public static void test(jugador j){ | |
j.puntos = j.puntos + 3; | |
} | |
public static void main(String args[]) | |
{ | |
System.out.println("Hello World!"); | |
jugador j1 = new jugador(); | |
j1.puntos = 2; | |
test(j1); | |
System.out.println(j1.puntos); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment