Core Java - Interview Questions I


Q. What is the base class of all classes?
java.lang.Object
Q. Does Java support multiple inheritance?
Java doesn't support multiple inheritance.
Q. Is Java a pure object oriented language?
Java uses primitive data types and hence is not a pure object oriented language.
Q. Are arrays primitive data types?
In Java, Arrays are objects.
Q. What is difference between Path and Classpath?
Path and Classpath are operating system level environment variales. Path is used define where the system can find the executables(.exe) files and classpath is used to specify the location .class files.
Q. What are local variables?
Local varaiables are those which are declared within a block of code like methods. Local variables should be initialised before accessing them.

Comments