Hi Everybody,
Are there any methods(or ways) in
Java that gives same functionality same as 'DECODE' function in Oracle.
Eg : In Oracle
DECODE(X,'A',1,'B',2,'C',3,4) function works like this:
If column X equals 'A' then it returns 1,if 'B' then 2 ,if 'C' then 3,if not any of the above then it returns 4.
I want the same functionality in Java also ,we hava already one provision for that like below
(X!=null)?Double.parseDouble(X):0;
but here we can give only one option.But i want the solution for multiple options.