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 super keyword?
Classes and structs support inheritance. Is this statement true or false?
What is Polymorphism, overloading, overriding and virtual?
What are virtual functions, base class pointer, derived class pointer, biding references?
What are the various types of constructors?
What is the difference between public, private and protected access modifiers?
What is the @functionalinterface annotation?
Explain about message passing in object oriented programming?
Explain the different types of constructors
What is method overriding?
What is a nested interface?
Can we have default method with same name and signature in the derived interface as the static method in base interface and vice versa?
Explain what is an object?
Can a function be overloaded based on return types?
What is abstraction? How does it differ from encapsulation