Java Beginner: Lesson 5
while loop In order to repeat a certain action or set of actions like in most programming languages even in Java there are loops that make possible such an action. In this lesson we will see the while loop. In this lesson we will continue customizing our hello world application with which we have worked in the previouse lessons we will add a while loop into it. This loop will help us repeat operation and not exit the application after the first operation. The state of the main method before we add the for loop is as shown bellow. Example code: public static void main(String[] args) { // TODO code application logic here Scanner scanner = new Scanner(System.in); double nr1=0; double nr2=0; String operation; double result =0; System.out.println("Give the first number: "); nr1= scanner.nextDouble(); System.out.println("Give the operation: "); operation = sca...