I thing my question is very simple for you. I am recently starting with programming. I woudl like to know exactly what it's doing the null of the showMesageDialog(null,"string").
I always see that people set null, but I don't know exactly why is the reason to put null.
I put an example.
Hope you can help me.
"JOptionPane.showMessageDialog(null, "ERROR DE PENSION");"
//1. Definicion de variables
int pension;
String categoria;
Double Promedio;
Double Descuento;
categoria = txtTP.getText().toString();
System.out.println("hola" +categoria);
if (categoria.equalsIgnoreCase("A"))
pension = 550;
else
if(categoria.equalsIgnoreCase("B"))
pension = 500;
else
if(categoria.equalsIgnoreCase("C"))
pension = 460;
else
if (categoria.equalsIgnoreCase("D"))
pension = 400;
else
pension = 0;
JOptionPane.showMessageDialog(null, "ERROR DE PENSION");
Aucun commentaire:
Enregistrer un commentaire