Java 1 Intro Code a while loop that keeps printing You are t
Java 1- Intro.
Code a while loop that keeps printing “You are temporarily insane!” as long as the user is in love. Assume the loop-control variable, inLove, is already declared along with input for the Scanner class. The while loop requires a priming read for the loop-control variable prior to entering the loop.
Solution
import java.util.Scanner;
 class intro
 {
 public static void main(String[] args)
 {
     Scanner s = new Scanner(System.in);
     String inLove = s.next();
 
 while(inLove.equals(\"Love\"))
 {
     System.out.println(\"You are temporarily insane!\");
   
 }
 
 }
 }   

