Home » Java Basics » operators

operators

Java instanceof Example – How to use instanceof

In this example we will show how to use the operator instanceof in Java.This operator is a Type Comparison Operator and can be used when we want to check if an object is an instance of a specific class, an instance of a subclass, or an instance of a class that implements a particular interface. The instanceof operator compares an ...

Read More »

Modulo Operator

In this example we shall show you how to use the modulo operator. The modulo operator is an arithmetic operator that is used to divide one operand by another and return the remainder as its result. You use the modulo operator to get the remainder of the division between an int variable and 10 and a double variable and 10, as ...

Read More »

Arithmetic Operators

With this example we are going to demonstrate how to use the arithmetic operators in Java. The arithmetic operators supported by the Java programming language are the Additive operator (also used for String concatenation), the Subtraction operator, the Multiplication operator, the Division operator, and the Remainder operator. In short, to use the arithmetic operators you should: Use the Additive operator ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns