What is the use of “bin” and “lib” in JDK?
“bin” contains all tools such as javac, appletviewer, awt tool, etc. whereas “lib” contains API and all
packages
What are the legal operands of the instanceof operator?
The left operand is an object reference or null value and the right operand is a class, interface, or array type.
How is it possible for two String objects with identical values not to be equal under the == operator?
The == operator compares two objects to determine if they are the same object in memory. It is possible for two String objects to have the same value, but located indifferent areas of memory.
Why are the methods of the Math class static?
So they can be invoked as if they are a mathematical code library.
What is the relationship between a method’s throws clause and the exceptions that can be thrown during the method’s execution?
A method’s throws clause must declare any checked exceptions that are not caught within the body of the method.