answersLogoWhite

0

How do you represent or in java?

Updated: 11/5/2022
User Avatar

Wiki User

14y ago

Best Answer

A boolean or comparison in Java is made with the operator.

boolean a = true;

boolean b = false;

if( a b) {

...

}

A bitwise or comparison in Java is made with the | operator.

int n = 1;

int m = 2;

if( n | m == 3 ) {

...

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you represent or in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What does exclamation equals mean in java?

The exclamation equals in Java(x!=) is used to represent the logical NOT.


Why is the cup and saucer symbol used for the Java programming language?

Java is slang for coffee. The cup and saucer represent a cup of coffee, or java.


Which package in java is treated as default package?

java.lang defines the core Java language, without which all of Java would fail to operate. It is therefore the default package that must be used with every program that will run Java, as it contains all of the logic necessary for exception handling, threads, classes that represent primitives (and their associated logic), and so on.


Why use coffee cup logo in java?

Because java is the name of the coffee bean In order to represent the coffee in the cup it is represented with the cup


Why Java is referred to as hot cup of coffee?

The symbol of java used as a hot cup because At the time of taking morning TEA JAMES GOSLIN got a project which name was green project so thats why he uses the symbol of HOT CUP for JAVA.


Why you use string s in the java program?

Strings are used to represent text data. This lets you work with names and other variables that hold text.


What is the significance of boolean return type in Java?

It can represent a yes/no (true/false, high/low, male/female, failure/success etc) information.


What is the need of unicode in java?

The idea is to have a single character set that can represent ALL the languages of the World, without the need to change between different character encodings.


What is NumberFormatException in java?

NumberFormatException is a subclass of the RuntimeException class. An object of type NumberFormatException is thrown when an application attempts to convert a string (that does not represent a number) into a numeric type.


What Indonesian island is Jakarta on?

java


Does Visual Java plus plus and Java Builder is different from the Java language?

Yes!Visual Java plus plus and Java Builder is different from the Java language?


What are the different java technologies?

There are several types of Java technology. Some examples of Java software are Java ME, Java EE, Java SE, and Java Card. Java made the JAVA development kit for those that develop in Java. There is also Java Virtual machine and some class libraries. Java is also famous for its languages like Clojure, Beanshell, Groovy, Gosu, Rhino, Kotlin, JRuby, Scala, and Jython.