What’s the difference between importing and extending a class in Java
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Those are two very different things.
Importing a class, is making it so you can use that class without needing to qualify the full name in the current class you are writing.
Extending a class is creating a new class that is a subclass of some other class. This will allow you to add or change functionality of the class you are extending.