Hello!
I get the error " cannot return a value from method whose result type is void"
This is my first try at returning a value with a return statement. The code works fine .... just the return val part is not.
public class Calculate_11AM_Minutes {
/** Creates a new instance of Calculate_11AM_Minutes */
public Calculate_11AM_Minutes() {
SimpleDateFormat formatter_3 = new SimpleDateFormat("mm");// Mins Time Only !
Date currentTime_3 = new Date();
String MM = formatter_3.format(currentTime_3);
for ( int min_row=0; min_row<59; min_row++ ) {
Object X_min_0 = AddRFSwitchMain.jTable3.getModel().getValueAt(min_row,0);
String min_0 = X_min_0.toString();
if (MM.equals(min_0)){ //search for a match in look-up table
Object tab_min_1 = AddRFSwitchMain.jTable3.getModel().getValueAt(min_row,1);
int MIN_Multi = Integer.parseInt((String) tab_min_1);// this is the multiply by value of the matching time
long MIN_Mills = (MIN_Multi * 60000);
return MIN_Mills; //return MIN_Mills value here
}
continue;
}
}
}
.... I make call to this code above like this:
Calculate_11AM_Minutes MIN_Mills = new Calculate_11AM_Minutes();