res.next()
method will take the pointer to the next row. and in your code you are using it twice, first for the if condition (cursor moves to first row) then for while condition (cursor moves to second row).
So when you access your results, it starts from second row. So shows one row less in results.
you can try this :
if(!res.next()){
System.out.println("No Data Found");
}
else{
do{
//your code
}
while(res.next());
}