I don't spot any mistake on this code, however eclipse tells me that the variables are not initialized. It is only a warning, but after compiling it doesn't work either. I simply can't find the mistake and thing of this code being 100% correct. Please note that the structure of this code can not easily be changed because the code provided below is simplified so you do not have that much to read ;-)
int min1; float somefloat;
try {
//setting values for min and somefloat
min1 = 1;
somefloat = 0.92f;
} catch (IOException ioe) {
System.err.println("Read Exception");
}
while (true){
//warning: variables min1 and somefloat may not be initialized.
float value1 = (1023 - min1) * somefloat;
System.out.println("Value: " + value1);
}