public class Monster{
public final String TOMBSTONE = "Here Lies a Dead monster";
private int health = 500;
private int attack = 20;
private int movement = 2;
public String name = "Big Monster";
public int getAttack()
{
return attack;
}
public int getMovement()
{
return movement;
}
public int getHealth()
{
return health;
}
public Monster(int health, int attack, int movement)
{
this.health = health;
this.attack = attack;
this.movement = movement;
}
public Monster()
{
}}
public class Frank {
public static void main(String[] args){
Monster NewMonster = new Monster();
NewMonster.name = "Frank";
System.out.println(NewMonster.name + " has an attack value of " + NewMonster.getAttack());
}
}
When trying to create a new object from my Monster class I get this error:
Frank.java:5: error: cannot find symbol
Monster NewMonster = new Monster();
^
symbol: class Monster location: class Frank
I am very new to Java so sorry if this is a simple/easy fix but everything I have researched does not give me a solution to this error.
Thanks in advance for any replies/feedback.