Here you can find the source of quote(Object s)
quote()
method simply adds double quotes around a string.
Parameter | Description |
---|---|
s | the string to add double quotes to |
public static String quote(Object s)
//package com.java2s; public class Main { public static final String QUOTE = "\""; /**//from w w w. j a v a 2 s. c o m * The <code>quote()</code> method simply adds double quotes around a string. * * @param s the string to add double quotes to * @return a new string that is the result of concatenating the double quote character, the specified * string, and another double quote character in sequence */ public static String quote(Object s) { return QUOTE + s + QUOTE; } }