/* package whatever; // don't place package name! */
import java.util.* ;
import java.lang.* ;
import java.io.* ;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
Ideone aluno = new Ideone( ) ;
aluno.inserirCurso ( "matematica" ) ;
aluno.inserirCurso ( "historia" ) ;
aluno.inserirCurso ( "ciencias" ) ;
aluno.inserirCurso ( "informática" ) ;
aluno.inserirCurso ( "português" ) ;
aluno.listarCurso ( ) ;
}
public void inserirCurso
( String nome
) { System .
out .
println ( " Cadastre seus cursos aqui." ) ; for ( int totalCursos = 0 ; totalCursos < cursos.length ; totalCursos++ ) {
if ( cursos[ totalCursos] == null ) {
cursos[ totalCursos] = nome;
break ;
}
}
}
public void listarCurso( ) {
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCVN0cmluZ1tdIGN1cnNvcyA9IG5ldyBTdHJpbmdbNV07CgkKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCUlkZW9uZSBhbHVubyA9IG5ldyBJZGVvbmUoKTsKCWFsdW5vLmluc2VyaXJDdXJzbygibWF0ZW1hdGljYSIpOwogICAgYWx1bm8uaW5zZXJpckN1cnNvKCJoaXN0b3JpYSIpOwogICAgYWx1bm8uaW5zZXJpckN1cnNvKCJjaWVuY2lhcyIpOwogICAgYWx1bm8uaW5zZXJpckN1cnNvKCJpbmZvcm3DoXRpY2EiKTsKICAgIGFsdW5vLmluc2VyaXJDdXJzbygicG9ydHVndcOqcy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