answersLogoWhite

0

The "extends" keyword in Java is how you declare a subclass.

class Base {

void foo() {}

}

class Sub extends Base { //Sub is now a subclass of Base

void begin()

{

Sub s = new Base(); //cannot do this the other way around!

}

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you write programs in bluej?

by typing it in bluej


Differentiate between extends and implements keywords?

The extends keyword is used to extend/inherit the features of another class whereas the implements keyword is used when a class is implementing the features of an interface. Both these keywords are used during Inheritance


The Java keyword is used to declare a class as a subclass of another class?

class MyClass extends AnotherClass {}


Who are some of the Institutions that are using BlueJ?

BlueJ was developed mainly for educational establishments such as schools, colleges and universities. It supports the learning of object-oriented programming.


Is java and bluej the same?

No, Java and BlueJ are not the same. Java is a high-level programming language used for building applications, while BlueJ is an integrated development environment (IDE) specifically designed for teaching Java programming. BlueJ provides a user-friendly interface and tools that help beginners learn Java more effectively, but it requires Java to run and execute the programs written in it.


Can java beans be compiled through bluej?

Of course. A JavaBean is just a specially formatted class. Any Java compiler (or an IDE like BlueJ) will be able to compile it.


How do you implement inheritance in java?

Inheritance can be implemented in Java using the two keywords "extends" and "implements" Extends keyword is used when one class is expected to inherit the full functional behavior of another class. Implements keyword is used when one class is expected to take the skeleton features of an Interface and implement the functionality in the current class.


What Does Skills And Experience Keyword Mean?

It means one word that sums up both!


What does the keyword "mean" typically refer to in the context of statistics and data analysis?

In statistics and data analysis, the keyword "mean" typically refers to the average value of a set of numbers.


How can you become a good java programmer. Using Eclipse or even BlueJ?

It is suggested to take college courses in Java to become a good Java programmer using the programs Eclipse or BlueJ. These courses can be found in-class, or online.


What does the keyword "menace" mean in Magic: The Gathering?

In Magic: The Gathering, the keyword "menace" means that a creature can't be blocked except by two or more creatures.


What does the keyword "regenerate" mean in Magic: The Gathering?

In Magic: The Gathering, the keyword "regenerate" allows a creature to avoid destruction by removing all damage from it and tapping it.