Reverse a two number and Then Add it

 given two numbers. 
reverse 2 numbers. 
add those two reversed numbers. 

Input : 31000 
2500 

Output : 65 

MY SOLUTION:


import java.util.*;
import java.lang.*;
import java.io.*;


class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner s=new Scanner(System.in);
long a,b;
a=s.nextLong();
b=s.nextLong();
        String c=String.valueOf(a);
String d=String.valueOf(b);
        c=new StringBuffer(c).reverse().toString();
        d=new StringBuffer(d).reverse().toString();
        a=Long.parseLong(c);
        b=Long.parseLong(d);
System.out.println(a+b);
}

}

Convert resultset object to list of map

Convert the resultset object to list of map In some cases, while we doing API automation, we need to fetch the value from the DB and hav...