Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • Last Modified:

how to read the string as it is in Java

How can I read a string as it is..?

The actual String is something like this " This is my name <check for break> and I want to test for <check for break>".  but when I'm trying to read this string I can see all special characters are using escape code sequences (ex: < is looking like &lt; and > looks like &gt;) and creating little ptoblem while I want read the string.

Is there any method which makes me read the string as it is Java , though it has escape code sequences...?

Thanks


0
Suda_RamanaReddy
Asked:
Suda_RamanaReddy
  • 2
  • 2
  • 2
  • +1
2 Solutions
 
objectsCommented:
you need to decode them yourself once you're read the string, for eaxample using replaceAll()
0
 
ksivananthCommented:
below are the list of encoded chars and its appropriate decoding,

&amp; & 
&apos; '
&quot; " 
&lt; < 
&gt; > 
0
 
ksivananthCommented:
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Suda_RamanaReddyAuthor Commented:
Hi.... Thanks... We changed the way we input the data...
0
 
Suda_RamanaReddyAuthor Commented:
Can you delete this question now... I think it's better we have the option to delete the question...!
0
 
objectsCommented:
that doesn't make the answers invalid :)
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now