Using the if statement with the Serial monitor

AnonymooseYT:
Then what should i use??

== like you did here:

while (Serial.available()==0)