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

[173 byte] By [maghiaa] at [2007-11-27 11:03:37]
# 1

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!

georgemca at 2007-7-29 12:51:14 > top of Java-index,Java Essentials,New To Java...