130k views
3 votes
Please help me out

Write an if structure that will determine if the character ch is neither a new line, space, nor a tab character.

Please help me out Write an if structure that will determine if the character ch is-example-1

1 Answer

0 votes

In Java:

if (!Character.isWhitespace(ch)){

System.out.println("ch is neither a new line, space, nor a tab character");

}

else {

System.out.println("ch is a new line, space, or a tab character.");

}

Just put this if block wherever you need it.

User Nekisha
by
8.7k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.