I am trying to get double value from json, I want to ask how to check double value, empty or not?
that's how i start it private static
final String kartu_xcord = "xcord";
private static final String kartu_ycord = "ycord";
ouble xcord,ycord;
this is how i parse my json:
xcord = c.getDouble(kartu_xcord);
ycord = c.getDouble(kartu_ycord);
this is how i try to check xcord null or empty:
if (xcord.isNaN()) {
LinlayNoMap.setVisibility(View.VISIBLE);
} else {
linlaymap.setVisibility(View.VISIBLE);
}
Hope someone can help me solve my problem, thank you.
source
share