1. write a variant of the following program which produces the output:

            false 
            false 
            true 
            false 
            true 
            true 
            false 
            false 
    Your modifications should be restricted to the first class, and should not use the ‘println’ command.
    class prg{ 
      public static void main(String[] args) { 
        Bulb b1 = new Bulb(); 
        b1.flip(); 
        b1.flip(); 
        b1.flip(); 
        b1.flip(); 
    } } 
    class Bulb { 
      boolean status; 
      Bulb () { status=true; } 
      void flip (){ 
         status = ! status; 
         System.out.println( status ); 
      } 
    } 
    Hints:

    1. Compile and execute the given program. Inspect the output.

    2. Try understanding the effect of the different instructions in the body of method ‘main’:

      1. Try deleting different instructions in the body of ‘main’, and check the outcome.
      2. Try adding to the body of ‘main’ instructions similar to those that are already there, and check the outcome.