Hi Ernest,
I thank you for your answer re. Boolean code. I followed your advice and i have now written a new program:
class booleanTrial2
{
public static void main (
String [] args)
{
boolean isdooropen = true;
if (isdooropen == true;
System.out.println(isdooropen); // no + needed
System.out.println("above statement result of (isdooropen == true)");
isdooropen = false;
if (!(isdooropen))
System.out.println(isdooropen);
System.out.println("above statement result of (isdooropen == false)");
}
}
/* It prints alright, or could I have done in a different way?
Now another question: Why are java programs sometimes segregated as
"source file" and "program file (with the *.class files total 4)
and sometimes only 1 program (Source and program together: total 1 .source and 1 .class file?
Thank you very much for your help.
Charles.