• Post Reply Bookmark Topic Watch Topic
  • New Topic

Single quote and double quote in EL []  RSS feed

 
L Yan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am doing the Mock Exam in HFSJ Chapter 8, question No 2. The correct answer is:

<a href='mailto:${initPara['master-email']}'>email me</a>

I thought it should be:

<a href='mailto:${initPara["master-email"]}'>email me</a>

I am wondering whether the single quote and double quotes are both OK to enclose a String inside [].

Thanks.
 
Amit Tayal
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, you can use single or double quote to enclose string literal.

Amit
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!