My teacher taught the class how to use System.out.println("Mensagem")
in this way for the class (the type of total_alunos
does not matter):
System.out.println("Existem ", total_alunos, " alunos na classe.");
After popping some errors on the computers I said that it was necessary to concatenate the string through +
, which worked, but she said that commas should work as well. At some point, was it possible to perform this function in the way presented above? If so, which version of Java?