2 wrong? How, I think, every programming language compares intand a charfrom ASCIIvalue behaviorchar I am new to java-Expression-...">

Why is "1"> 2 wrong?

How, I think, every programming language compares intand a charfrom ASCIIvalue behaviorchar

I am new to java-Expression-Language. Now I created the file .jspin NETBEANS 5.5.1

CODE:

   <%=('1' > 2)?"true":"false"%>   //true
    ${('1' > 2)?"true":"false"}    //false

What is the difference in these expressions?

+3
source share
2 answers

EL has no idea char. He was regarded as String. Single or double quotes, it does not matter, it is a String.

More information on EL can be found in the EL 2.2 specification .

+7
source

JSP EL char. 'a' , a, java char. JSP EL , . , , "1" 1, .

+4

Source: https://habr.com/ru/post/1780977/


All Articles