I am trying to execute this basic program in Katalon Studio and Java but the O/P shows
if (i < 12)
Can you help me out on how to execute or use Java in Katalon Studio just like IntelliJ or Eclipse?
int i = 10;
if (i == 10)
{
// First if statement
if (i < 15)
System.out.println("i is smaller than 15");
// Nested - if statement
// Will only be executed if statement above
// it is true
if (i < 12)
System.out.println("i is smaller than 12 too");
else
System.out.println("i is greater than 15");
}
Simple:
</> Script
tab near the bottom of your work windowRun
button at the top and you will get the following (or similar) output:Note: In Katalon Studio, you have to import Java libraries manually. This tool is not able to import automatically as eclipse can. For example, if you have to format data then need to import the libraries below: