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
5.8k points