To run the class method, I would recommend setting up unit test (see Testing and code analysis). This is a bit more configuration work than BlueJ's on-the-fly method, but it's worth it because you can easily repeat the same tests and even automate testing. For instance.)
if (x=1){
DoSomething();
System.out.println("yes, x = 1 !");
}
else{
SendError();
System.out.println("No, x Not Equals 1 !");
}
If Really x = 1, you will see the output of the program "yes, x = 1!". If not, you will see another statement, “No, x Not equal to 1!”.
user9181740
source
share