Java Programming Basics Interview Questions - 1

Question: 1

What is dynamic binding (late binding)?

Binding refers to the linking of a procedure call to the code to be executed in response to the call.

Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run time.

Question: 2

What type of parameter passing does java support?

In Java the arguments are always passed by value.

Question: 3

What is heap in java?

Java is fully Object oriented language. It has two phases first one is Compilation phase and second one is interpretation phase.

The Compilation phase convert the java file to class file (byte code is only readable format of JVM) than interpretation phase interoperate the class file line by line and give the proper result.

Question: 4

Do multiple inheritance in java?

It’s not possible directly. That means this features is not provided by Java, but it can be achieved with the help of Interface.

By implementing more than one interface.

Question: 5

Can we declare a static variable inside a method?

No, static variables can’t be declared inside a method otherwise the class will not compile.

Related Questions