Login
Remember
Register
Ask a Question
What are the differences between #include in C and import in Java?
0
votes
asked
Jan 11, 2024
in
C Plus Plus
by
GeorgeBell
What are the differences between #include in C and import in Java?
c-programming-interview-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 11, 2024
by
GeorgeBell
#include
import
#include is a statement not a keyword.
While import is a keyword.
It is processed by pre-processor software.
It is processed by compiler.
It increases the size of the code.
It doesn’t increases the size of the code. Here, even if we write
import java.lang.*;
it will not attach all the class. Rather it will give permission to access the class of java.lang
...