How do you make an if statement check if something is null, and will return null if the if statement is true?
public String getMiddle(String word)
{
// I don't know if 'is null' or 'return null' are actually things
if (is null){
return null;
}
}
Also, what would be an example of an input that would make it null?
Aucun commentaire:
Enregistrer un commentaire