You are setting a text somewhere. Why?
You want to go through all of these cases - so there must only be if and all if must be on same level.
Also you want to create a sum of all cases that have been true - so do that:
double dSum = 0.0;
if(something){
dSum += 1;
}
if(somethingelse){
dSum +=2:
}
System.out.println("Sum is " + dSum);