Java   View all facts   Glossary   Help
specification > class > abstract class
Next classancestor    Upclass    Previous classwrapper class   

abstract class
subjectfact 
abstract classcan define 1 programming interfaceadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:35:56.0
can have concrete methods or instance variables    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:35:56.0
can omit some or all of the implementation of its methods    added by: JK, source: Sun Java Tutorial Laganière, 2001-10-19 11:35:57.0
can provide 0 or more method declarations for all methods needed to implement its programming interface to its subclassesadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:35:57.0
cannot be finaladded by: JK, source: On To Java, 2001-10-19 11:35:57.0
cannot have instancessource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:35:57.0
defines generic behaviouradded by: JK, source: Sun Java Tutorial, 2001-10-19 11:35:57.0
has definition A class that can only be subclassed - it cannot be instantiated or the compiler will display an error message and refuse to compile the program    added by: JK, source: Sun Java Tutorial, modified by: JK, reference: Tutorial, 2001-10-19 11:35:57.0
has purpose to hold features that will be inherited by two or more subclasses    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:35:57.0
is the opposite of concrete classadded by: JK, 2001-10-19 11:35:57.0
is a subtopic of Classes2001-10-19 11:35:57.0
is created by specifying the abstract keyword on the first line when you declare the class    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:35:57.0
is not required to have any abstract methods    added by: JK, source: Sun Java Tutorial, 2001-10-19 11:35:57.0
is a kind of classadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:35:57.0
usually is not fully definedadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:35:57.0
class 2001-10-19 11:36:19.0
2001-10-19 11:36:19.0
2001-10-19 11:36:19.0
2001-10-19 11:36:19.0
2001-10-19 11:36:19.0
adds 0 or more variables to the variables it inherits from its superclass2001-10-19 11:36:19.0
adds 0 or more methods to the methods it inherits from its superclass2001-10-19 11:36:19.0
can access any public class in other packages2001-10-19 11:36:20.0
can be imported from a package2001-10-19 11:36:20.0
can extend only one superclass    2001-10-19 11:36:20.0
can implement more than one interface    2001-10-19 11:36:20.0
can override methods that are inherited from the class's superclass2001-10-19 11:36:20.0
can protect its members from access by other classes or objects using an access modifier2001-10-19 11:36:20.0
cannot inherit method implementations from an interface2001-10-19 11:36:20.0
contains all of the code that relates to its objects including    2001-10-19 11:36:20.0
contains data associated with each object2001-10-19 11:36:20.0
declares a list of variables, called instance variables, corresponding to data that will be present in each instance    2001-10-19 11:36:20.0
has benefit 2001-10-19 11:36:20.0
has example
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
2001-10-19 11:36:20.0
has part class name2001-10-19 11:36:20.0
has part code2001-10-19 11:36:20.0
has part constructor    2001-10-19 11:36:20.0
has syntax
class classname
{ // declarations of variables
// declarations of constructors
// declarations of other methods with public ones first
}   
2001-10-19 11:36:20.0
inherits 0 or more methods from its superclass2001-10-19 11:36:20.0
inherits 0 or more variables from its superclass2001-10-19 11:36:20.0
inherits behaviour from its superclass2001-10-19 11:36:21.0
is a descendant of Object class2001-10-19 11:36:21.0
is specified by 1 class definition2001-10-19 11:36:21.0
may have access modifier 2001-10-19 11:36:21.0
represents several similar objects2001-10-19 11:36:21.0
should be a member of 1 named package rather than the default package2001-10-19 11:36:21.0
should be named after a thing its instances represent in the real world2001-10-19 11:36:21.0
should be placed in its own source file    2001-10-19 11:36:21.0
should not be named after the internals of a computer system such as 'Record', 'Table', 'Data', 'Structure', or 'Information'    2001-10-19 11:36:21.0
should order elements as follows:
  1. class variables
  2. instance variables
  3. constructors
  4. the most important public methods
  5. methods that are simply used to access variables
  6. private methods
2001-10-19 11:36:21.0
to instantiate you create an instance of it2001-10-19 11:36:21.0
uses an implements clause to declare that it contains methods for each of the operations specified by the interface    2001-10-19 11:36:21.0
access unithas access mode2001-10-19 11:35:59.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0

Kinds of abstract class :

Next classancestor    Upclass    Previous classwrapper class