Java - Write code to Wrap given string token with double quotes.

Requirements

Write code to Wrap given string token with double quotes.

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        String str = "book2s.com";
        System.out.println(doubleQuote(str));
    }/*from   w w  w  .ja  v  a 2s  . c  om*/

    /**
     * Wrap given string token with double quotes.
     * 
     * @param str
     * @return a string token wrapped around with duble quotes
     */
    public static String doubleQuote(String str) {
        return ((str == null) ? null : "\"" + str + "\"");
    }
}