Why is the following code wrong? I copied it from the article that was supposed to teach me.
public class Solution //swapped "house" for "solution
{
public static void main (String[] args) //there is never explained what exactly this line do ...
{
System.out.println("Amigo is very smart"); // commentary number one
}
}
//commentary number one: since every command has to be written on a new line i did add a line with the print command here and swapped "Robots are friends to humans" with "Amigo is very smart", sounds logical enough to me. What else am i supposed to do?
The error says: Be sure that you are displaying the text on the console.
The output is too short.
Check the case of the letters. Uppercase and lowercase letters are considered different.
What am I doing wrong? I don't understand the error message
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Thomas
2 November 2024, 08:31
// commentary number one:
This will be explained once the individual parts of that methods definition are no foreigners to you anymore.
For the rest... please attach task description along with your code (there's a litle checkbox you can tick). Just from the above code I do not see a problem. However you did not show the package declaration. If you deleted that, then validation can not work -> reset the task and restart.
0