Solved

Escape special characters in Java

Posted on 2007-03-30
2
1,896 Views
Last Modified: 2008-01-09
Hi,

I forming a string with a lot of characters that I need to escape, for example


String newStr = new String("\Hi, """ This is \\//complex string");

What I'm looking is there a function I can call to escape the the string automaticlly?

thanks.
0
Comment
Question by:yarock
2 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 18823958
Which ones?
0
 
LVL 11

Accepted Solution

by:
Manish earned 500 total points
ID: 18824106
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Impossible to extract MSI from new JAVA releases 2 51
recursion example 16 112
eclipse java  build path 6 45
netstat -ano | find "8000" and taskkill /f /pid 2984 3 39
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now