Menghitung Luas Segitiga pada Java

rumus: alas * tinggi / 2
Program java :
import javax.swing.JOptionPane;
public class luassegitiga
{
public static void main(String args[])
{
String first;String second;int number1;int number2;int sum;
first=JOptionPane.showInputDialog("Masukkan alas");
second=JOptionPane.showInputDialog("Masukkan tinggi");
number1=Integer.parseInt(first);
number2=Integer.parseInt(second);
sum=number1*number2/2;
JOptionPane.showMessageDialog(null,"Luas segitiga adalah"+sum,"Hasil",JOptionPane.PLAIN_MESSAGE);
System.exit(0);
}
}