This is the fragment of my code:
public static void Lista(String textList) {
String[]stList= textList.split(",");
Arrays.asList(stList);
for(int i = 0; i < stList.length; i++){
System.out.println("Escribe un String para convertirlo a List: ");
if((stList == null) || (stList.equals(""))){
System.out.println(" El campo que ingreso esta vacio, vuelva a ingresarlo");
}else{
System.out.println(stList[i]);
}
}
}
It's a list, which I'm dealing with the If and Else commands that tell me that the field is empty and that it shows the message again: "Write a String to convert it to List:"