Hey Guys!
I got a problem with getting a String from my Violator.class in Player.class
Greenfoot says: cannot find symbol - variable type
Code in Violator.class:
public class Violator extends Actor
{
public String type;
....Rest of Code
Code in Player.class:
Actor violator = getOneIntersectingObject(Violator.class);
if(violator.type=="red")((Play)getWorld()).health-=5;
..............................................
violator.type cannot be found? But why? Thanks for help

