Java Data Type How to - Double quote and single quote








Question

We would like to know how to double quote and single quote.

Answer


public class MainClass {

  public static void main(String[] arg) {
    System.out.println("\" It\'s good\".");
  }

}

The code above generates the following result.