This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Representation of strings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Representation of strings" Watch "Representation of strings" New topic

Representation of strings

vinayak manda
Ranch Hand

Joined: Jul 27, 2004
Posts: 31
Which are valid/invalid and if so why?

String s = "\n";
String s1="\r";
String s2= "\u000a";
String s3 ="\u000d";
String s4="'\u0041'";
String s5="\u0041";
String s6 ="\uD7AF";
Louie van Bommel
Ranch Hand

Joined: Aug 17, 2004
Posts: 76
Hop to the jls, section 3.10.5 String Literals
Have you checked out Aspose?
subject: Representation of strings
It's not a secret anymore!