Comment: C++ "includes" behavior and java "imports"
Answer Posted / mrangababu
#include in C/C++: #include makes a compiler to copy header
file code into a C/C++ program.
Dis Adv:It increase the program size unnecessarly.wastage
of memory and process time.
import in java : import statement makes JVM to go to the
java library execute the code there at finally substitute
the result into java program.JVM physically will not copy
any code.
import is efficient than #include....
| Is This Answer Correct ? | 16 Yes | 4 No |
Post New Answer View All Answers
What is the @functionalinterface annotation?
What is the need of multiple inheritance?
Do we require a parameter for constructors?
What is static and dynamic Binding?
How does abstraction differ from encapsulation.
What do you mean by operator overloading?
Can a class in java be inherited from more than one class?
Define Initialisation Purpose.
What is ‘this’ pointer?
What is virtual multiple inheritance?
What is single and multiple inheritance?
How can we restrict inheritance for a class so that no class can be inherited from it?
What is multiple inheritance? How java 8 supports multiple inheritance?
Can we override static methods of a class?
Can you give some examples of tokens?