Java operator interview questions
What is the difference between
the >> and >>> operators?
What is the difference between the
Boolean & operator and the && operator?
Java operator - Jan 15, 2009 at 8:10
am by Amit Satpute
What is the difference between the >> and
">>" is a signed right shift
">>>" is an
unsigned right shift.
If >> is applied on a negative
number, the result will still be negative.
the sign of the number.
If >>> is applied on a negative
number,the result will be a positive number
The >> fills from the left with the sign bit (0 or
The >>> zero-fills from the left.
What is the difference between the Boolean &
operator and the && operator?
"&" is the "bit-wise AND" operator.
"&" constitutes the (unconditional)
"logical AND" operator
"&" always evaluates both
"&&" is defined for two boolean arguments.
It is the
"conditional logical AND" operator.
"&&" ealuates the
first argument. if it is true, it then evaluates the second.
specifies the ranges for primitive values. The selection of values
in integer or floating point types differs based on the requirement
There are two ways of
affecting access levels. One, when the classes in the Java platform
are used within the developer defined classes, the access levels
determine the members of those class which can be used by the
Sets can have unique values. Lists can have