Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Mausam Newsgroups: comp.lang.java.programmer Subject: Re: Escape character for single quotes. Is it really required in String? Date: Tue, 7 Feb 2012 04:29:08 -0800 (PST) Organization: http://groups.google.com Lines: 17 Message-ID: <2362811.69.1328617748528.JavaMail.geo-discussion-forums@pbcjq2> References: <93e3af31-e4d8-43df-9c03-9645b6885d1e@l16g2000vbl.googlegroups.com> Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 122.179.39.103 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1328618535 24211 127.0.0.1 (7 Feb 2012 12:42:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 7 Feb 2012 12:42:15 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=122.179.39.103; posting-account=BE4JzgoAAACLX-aQYawit5MkTNnptKNs User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11810 On Tuesday, 7 February 2012 17:00:16 UTC+5:30, Leif Roar Moldskred wrote: > Mausam wrote: > > > How the two string is different? And when should I use escape > > character for single quote? > > In character literals. > > char apostrophe = '\''; Thanks. For char it makes sense. But then my understanding that this escape character does not make any difference when used in String is correct. > > -- > Leif Roar Moldskred