It should look something like this:
public class numbert {
public static void main(String[] args) {
String inData;
int num ,num2;
int sum;
int avg;
inData = JOptionPane.showInputDialog (null, "Enter an Integer Value.") ;
num = Integer.parseInt (inData); // convert inData to int
inData = JOptionPane.showInputDialog (null, "Enter another Integer Value.");
num2 = Integer.parseInt (inData);
sum=num + num2;
avg= sum/2;
System.out.println ("Sum of both numbers:" +sum);
System.out.println ("The average is:" +avg);
System.out.println ("Good-bye for now, suckahfish!"); //always executed
}
}
The problem was you were trying to intialize sum and avg with the variables num and num2 before you had values there.