Page 61 - CA_Blue( J )_Class9
P. 61

Backspace (\b)
                 It is used to insert a backspace in the text.


                  Program 7      Write a program to demonstrate the use of \b.

                   1  class escapesequence_backspace

                   2  {
                   3      public static void main()

                   4      {
                   5          System.out.println("Use of Backspace: " + "RAM\bKUMAR\bSHARMA");

                   6      }
                   7  }

                 You will get the following output:












                 Form Feed (\f)
                 It is used to insert a form feed (mostly considered as a page break by most word processors or text editors) in the text.


                  Program 8      Write a program to demonstrate the use of \f.

                   1  class escapesequence_formfeed

                   2  {
                   3      public static void main()

                   4      {
                   5          System.out.println("Use of FormFeed: India\fcountry");

                   6      }
                   7  }


                 You will get the following output:

















                                                                                               Values and Types  59
   56   57   58   59   60   61   62   63   64   65   66