Avatar of Nika Gudge
Nika Gudge
Flag for United States of America

asked on 

null pointer exception

below implementation of if-else checks
1. if the key is in the map
2. if not else logic should fetch data from database.

but it throws null pointer exception at if statement and does not execute the else part.

if(mapVpay.containsKey(new Integer(clientID))){

}else{
//
fetchRecordFromDataBase
}
Java

Avatar of undefined
Last Comment
CEHJ

8/22/2022 - Mon