Chaps, sorry I have a silly question. I am not quite sure if this is right, but what is the differenct between the two below:
public class myclass{
public static void main( String args[] ){
boolean variable1 = false;
boolean variable2 = false;
...
System.out.print(variable1 + " and " + variable2)
}
and
public class myclass{
boolean variable1 = false;
boolean variable2 = false;
public static void main( String args[] ){
...
System.out.print(variable1 + " and " + variable2)
}
Does it mean that in the second snippet the variables are static? Also will I be able to print both of the variables in both snippets without compilation errors?
thanks