Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Single quote and double quote in EL []

 
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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!