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]
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]
Usually an ';' is added at the end of each command, such as this:
System.out.println("yes")
System.out.println("yes");
will work
will work
Thank you for repeating the solution I gave 17 hours before your post!
You are getting sarcastic !!!!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.