import Vs. extend
i am new to java.
i want to know the difference between importing a class and extending a class?
please help me with some example.
thanks in advance
i am new to java.
i want to know the difference between importing a class and extending a class?
please help me with some example.
thanks in advance
They're such terribly different concepts that you should erase from your memory any percieved similarities you have!
Importing is virtually meaningless. It's simply a shorthand way of telling the compiler what classes you're using. Imports don't exist at runtime
I won't bother explaining what "extend" does - you either already know, or need to read up about it. Either way, it's somewhat large to be explained away in this post!