Create a Java program that sets up a game character with a name, health points, experience level, and tutorial status. Fill in the blanks in the code to display the character's information correctly.
Types and variables
Forge your digital destiny
Report a typo
Fill in the gaps with the relevant elements
GameCharacter {
public void main([] args) {
String characterName = "Hero";
healthPoints = 100;
double experienceLevel = 1.5;
boolean tutorialCompleted = false;
System.out.println("Character: " + characterName + "\nHP: " + healthPoints + "\nLevel: " + experienceLevel + "\nTutorial Completed: " + tutorialCompleted + "\n");
}
}Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.