0
if (a>b || a==2){
System.out.println("yes")
}

[quotes]
in if command it gives an error, sayin operator || can not be applied to a boolean.

I want to know how to use the and &&, or || operations in java..
[\quates]

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by staneja
0

will work

Thank you for repeating the solution I gave 17 hours before your post!

Edited by javaAddict: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.