There are situations in which we have a
boolean value in string format (‘true’ or ‘false’) and we want its
boolean equivalent (such as true or false).
Practical application is when we have a check condition value which is stored as a string in database and based on this value we want to perform some operation on our html page (or jsp).
Off course, we can compare the string returned from database with ‘true’ and ‘false’ and get a
boolean as a result but this may not be a perfect solution.
Below, I have tried to collect some approaches to achieve this. Read On !!! (more…)