For my code, I need to be able to check if a string is equal to a string from another class (Minion).
When I run this code, the Terminal keeps saying: 0/0
But when I remove the commenting:
The terminal says: null one and then the games stops.
What is going on?
public Things() { setImage(blank); GreenfootImage image = getImage(); image.scale(image.getWidth() - 250, image.getHeight() - 250); setImage(image); } public void act() { System.out.println(Minion.chunk); //System.out.println(Minion.chunk.equals("0/0")); }
public Things() { setImage(blank); GreenfootImage image = getImage(); image.scale(image.getWidth() - 250, image.getHeight() - 250); setImage(image); } public void act() { System.out.println(Minion.chunk); System.out.println(Minion.chunk.equals("0/0")); }