I am missing something here. If I comment out the IF statement then the java package will compile with SLC. When the IF statement is present SLC gives the following error:
math.java:74: ';' expected
If (number == 10)
^
What am I doing wrong?
math.java:74: ';' expected
If (number == 10)
^
What am I doing wrong?
B4X:
public String ConvertToHex (int number) {
int waarde;
int newx;
String bin;
newx = number;
waarde = number;
bin = "";
do {
waarde = (waarde % 16);
If (waarde == 10) //comment out - then compiles
bin = bin.concat("A");
newx = (newx - waarde)/16;
waarde = newx;
} while(newx != 0);
return bin;
}