• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Expression language problem

 
Vijay Chandran
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

${7 div 0} displays the output Infinity

But

${7 mod 0} throws java.lang.ArithmeticException: / by zero

Why is the difference here. Kindly clear my doubt.

Thanks,
Vijay
 
Swathi Kota
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In EL divide by zero shows infinity but mod 0 throws exception.. that's how it is designed to work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic