Created
April 8, 2014 23:52
-
-
Save comtom/10210500 to your computer and use it in GitHub Desktop.
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
| package turcobomber; | |
| public class TurcoBomber { | |
| public static void main(String[] args) { | |
| System.out.println("Alumnos instanciados:"); | |
| // crea los objetos | |
| pack.Alumno tomy = new pack.Alumno("Tomas", "Gonzalez Dowling", 28); | |
| pack.Alumno flaco = new pack.Alumno("Juan", "Gonzalez Soler", 21); | |
| // imprime nombre, apellido y edad convirtiendo en lower y upper | |
| System.out.println( flaco.toString().toUpperCase() +" "+ flaco.getEdad() ); | |
| System.out.println( tomy.toString().toLowerCase() +" "+ Integer.toString(tomy.getEdad()) ); | |
| // elimina el objeto flaco y libera la memoria | |
| flaco = null; | |
| System.gc(); | |
| //flaco.setNombre("flaco... esto se rompe"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment