Top 10 Java Interview Questions Answers
It depends on how you understand "inheritance". Java can only "extends" one super class, but can "implements" many interfaces; that doesn't mean the multiple inheritance is not possible. You may use interfaces to make inheritance work for you. Or you may need to work around. For example, if you cannot get a feature from a class because your class has a super class already, you may get that class's feature by declaring it as a member field or getting an instance of that class. So the answer is that multiple inheritance in Java is possible.
An abstract method is a method whose implementation is deferred to a subclass. Or, a method that has no implementation.
A static method is a method that belongs to the class rather than any object of the class and doesn't apply to an object or even require that any objects of the class have been instantiated.
Inheritance is the process by which one class (subclass) acquires the properties and behavior of another class (superclass).
Java is an object-oriented programming language. Java language is originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language is derived much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture that's why Java is called platform independent.
Yes, we can declare a private class as an inner class
Shallow copy shares the same reference with the original object like cloning, whereas the deep copy get a duplicate instance of the original object. If the shallow copy has been changed, the original object will be reflected and vice versa.
After a thread is started, via its start() method or that of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed.
A Java Virtual Machine (JVM) is a self contained operating environment that behaves as if it is a separate computer. Java applets, for example, run in a JVM that has no access to the host operating system.
Overriding is a method with the same name and arguments as in a parent, whereas overloading is the same method name but different arguments.
