The instanceof Operator in Java

The instanceof operator compares an object to a given type and checks if the type of object in left side is assignment-compatible to the type in the right side. i.e., if we can say right-side-type = left-side-type object without any casting.

Remainder Operator in Java Can Return Negative

According to mathematics, remainders are always positive. However, in java, when the remainder operation returns a nonzero result, it has the same sign as its left operand.  Though most mathematicians won’t agree, Java Language Specification still refers to % as a remainder operator only.

Expressions, Operands and Operators

An expression consists of operands and operators. A logical expression (e.g. a>b) is an expression that evaluate to a true or a false value. Operators with higher precedence are evaluated before operators with relatively lower precedence, when they come together.

Operator Plus(+) Overloading in Java

Java doesn't allow operator overloading yet + is overloaded for class String. Here we will discuss examples for use of + with Strings and characters.

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!