if(word.equals(" ")){
}
I have this IF statment, what i would like it to also do is the following..
if(word.equals(" ") OR word.equals(".") ){
}
I know the above code will not work, but im looking how to implement something like that? Anyone know how to do an if or, or do i have to use else if?
Android uses Java, and the boolean OR operator in Java (and in pretty much every single language with a C-inspired syntax) is ||
.
if (word.equals(" ") || word.equals("."))
Here is a document describing the Java operators. You may also want to read it from the start since it covers the basics of Java.
There are thousands of tutorials on Google explaining the basics of the Java language that you could also use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With