Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Thelma Murray   on Apr 21 In Java Category.

  
Question Answered By: Wilbert Patterson   on Apr 21

Speaking of languages with alternative  means of specifying quotes, C# has a
lovely one. For instance, let's say I want to make a multiline string  with
quotes in Java:

String js = "\n<script language=\"JavaScript\">\n\talert(\"Hi!\");\n</script>";

I could do it in C# like this:

string js = @"
<script language=""JavaScript"">
alert(""Hi!"");
</script>";

Now why can't Java have something like that?

Share: 

 
 
Didn't find what you were looking for? Find more on Alternative quote characters? Or get search suggestion and latest updates.


Tagged: