Hi I am trying to return a boolean value into another method, but it's not working.
public static boolean ItemFound(boolean item, String desc1, String desc2, JTextArea txt){
if(item == true)
txt.setText(desc1);
if(item == false){
txt.setText(desc2);
item = true;
}
return item;
}
and inside the other method I have
new ItemFound(pistol, "No other items found in Bedroom", "You found Pistol", txt);
the error I get is:
cannot find symbol constructor ItemFound(boolean,java.lang.String,java.lang.String,javax.swing.JTextArea)