Codigo:
package bean;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author yusesito
*/
public class beanauxl {
private String nom1;
private String pas1;
private String l1;
public beanauxl(){
nom1="lalo";
pas1="123";
l1="";
}
public String getNom1(){
return(nom1);
}
public void setNom1(String m){
nom1=m;
}
public String getPas1(){
return(pas1);
}
public void setPas1(String n){
pas1=n;
}
public String getL1(){
return(l1);
}
public void setL1(String m){
if(l1.contains("0")|| l1.contains("1")||l1.contains("2")||l1.contains("3")||l1.contains("4")||l1.contains("5")||l1.contains("6")||l1.contains("7")||l1.contains("8")||l1.contains("9"))
{
m="CORRECTO";
l1=m;
}
else
{
System.out.println("ERROR");
}
}
}
IMAGEN:
No hay comentarios:
Publicar un comentario