Sunday, January 26, 2014

How to print quotes in java?

Source:
public class PrintQuotes {

   public static void main(String[] args) {

      // Use an escape sequence \" or \'
      System.out.println("\"hello\" \'c\'");

   }
}

Output:
   $ java PrintQuotes 
   "hello" 'c'

Blog Archive