lundi 6 avril 2020

How to use if else for an array in java

I want to use if condition for my array. Here is my code:

*

String[] result = value_got.split(" ");

String fabric = result[5];

*

I want to check first if result[5] have any value or not. Because when it has value app works correctly but when it has no value my app keeps stoping. Please help Coders thank you.

Aucun commentaire:

Enregistrer un commentaire