public class Loopy {
static void startSentence() {
System.out.println("Before the Loop");
}
static void finishSentence() {
System.out.println("This is after the loop");
}
static void executeLoop(int x) {
while(x < 4) {
System.out.println("In the Loop");
System.out.println("Value of x is " + x);
x = x + 1;
}
}
public static void main(String[] args) {
startSentence();
executeLoop(1);
finishSentence();
}
}