Advertisement
ARIELCARRARO

MainPersona.java

Dec 28th, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. /**
  2.  * @file MainPersona.java
  3.  * @version 0.1
  4.  * @author Ariel Carraro
  5.  * @date   28.diciembre.2012
  6.  * @url    codemonkey
  7.  * @description Programa que muestra un mensaje
  8.  */
  9.  
  10. //clase principal
  11. public class MainPersona{
  12.  
  13.     public static void main(String[] args) {
  14.         new MainPersona().ver(new Persona());
  15.     }
  16.  
  17.     public void ver(Persona persona){
  18.         persona.verMsg();
  19.     }
  20.  
  21.  
  22. }
  23. //aqui defino la clase Persona
  24. class Persona{
  25.     public void verMsg(){
  26.         System.out.println("funcionando...desde Java");
  27.      }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement