Java

Let’s learn relational operators in java. Relational operators in java Relational operatorsĀ are used to compare two operands or variables for equality, greater than, less than etc., and return boolean output. There are six relational operators, equals to operator (==) less than operator (<) greater than operator (>) not equals to operator (!=) greater than equals…

Read More Relational operators in java

Let’s learn shift operator in java / bitwise right shift and left shift. Shift operator in java A shift operator basically used to perform bit manipulation on a number by shifting bits of first operand right/left. signed left shift operator or bitwise left shift operator (<<) signed right shift operator or bitwise right shift operator…

Read More Shift operator in java (bitwise right shift and left shift)

Let’s learn functional interface in java. Functional interface in java Functional interface is one kind of an interface which has only one abstract method. Syntax: @FunctionalInterface interface interfacename { // one abstract method } NOTE: @FunctionalInterface is an annotation. This annotation is optional. Before Java 8 an interface had abstract method signature but didn’t define…

Read More Functional interface in java

Let’s learn instanceof java. instanceof java instanceof operator is used to check whether the object is an instance of specified type. Type can be a class or a subclass or an interface. instanceof operator returns either true or false. It is also known as comparison operator. Let’s see instanceof java example. public class Example {…

Read More instanceof java