//PrintClass.Java
class PrintClass{
int x = 0;
int y = 1;
void printMe(){
System.out.println("x is" + x + ", y is " + y);
System.out.println("I am an instance of the class " + this.getClass().getName());
}
}
//Fuente: "Aprendiendo Java 2 en 21 días"
Ejercicios de practica del libro.
1 Response
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.