fork download
  1. class HelloWorld {
  2. public static void main(String[] args) {
  3. Teste1 teste = new Teste1();
  4. System.out.println("Criou a classe");
  5. teste.Teste1();
  6. }
  7. }
  8.  
  9. class Teste1 {
  10. public void Teste1() {
  11. System.out.println("Olá");
  12. }
  13.  
  14. public void Teste2() {
  15. System.out.println("Oi");
  16. }
  17. }
  18.  
  19. //http://pt.stackoverflow.com/q/197666/101
Success #stdin #stdout 0.04s 4386816KB
stdin
Standard input is empty
stdout
Criou a classe
Olá