Java   View all facts   Glossary   Help
specification > class
Next access unitconstructor    Upaccess unit, specification    Previous access unitvariable   

class comparison table
Subject return is a synonym of access from specify you use create you use communicate with implement be part of model see also contain import automatically into permit put into is a kind of enable receive have access to send define in be a subclass of is part of has definition refer to by define be the opposite of wait on require to be is a subtopic of correspond to have example of creation access refer to hide convert into is an instance of have methods convert be a member of notify have purpose omit relate to has part create by throw when provide share have be not
abstract class     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class       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 generic behaviourconcrete class have any abstract methodsfinalClasses  any public class in other packages      1 named package rather than the default package to hold features that will be inherited by two or more subclassessome or all of the implementation of its methods  specifying the abstract keyword on the first line when you declare the class 0 or more method declarations for all methods needed to implement its programming interface to its subclasses instancesfully defined
ancestor ascendant class   an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class       A class A is an ancestor of class B if it is farther up in the class hierarchy than class B and class B is descended from it a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programInheritance  any public class in other packages      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
Applet class     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interfaceapplet package  data associated with each object             a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programApplets  any public class in other packages   class  1 named package rather than the default package       implementation for all its instance methods unless the class is abstract stopping procedure in the Stop() method 
class defined within a method     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class         a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programClasses  fields within the method only if the fields are defined as final      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
class in a package     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object  a directory with the same name as the packageclass         a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programPackages  any public class in other packages      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
class that implements an interface     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class         a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programInterfaces  any public class in other packages      1 named package rather than the default package   other classes that implement the same interface in any other way   implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
class that imports a package     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class  methods and variables in the imported package that are not declared public      a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programPackages  any public class in other packages      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
collection class     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class         a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programCollections  any public class in other packages      1 named package rather than the default package working with collections of objects     implementation for all its instance methods unless the class is abstract iterator method for doing something with every member of the collection 
concrete class     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class       A class that can have instances a class type whose instances are the values of the class typeabstract class  the unit of data abstraction in an object-oriented programClasses  any public class in other packages      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
core class     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class       A public class (or interface) that is a standard member of the Java Platform a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programHow Java Works  any public class in other packages      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
descendent     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class       A class that inherits from another a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programInheritance  any public class in other packages      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
Exception class     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface  exceptiondata associated with each object             a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programException Handling  any public class in other packages   class  1 named package rather than the default package       implementation for all its instance methods unless the class is abstract specification 
FileInputStream     to read bytes from a file more than one interface   data associated with each object reading 1 byte at a time           a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programInput and Output 
FileInputStream stream = new FileInputStrem(inputFileNameOrPath);
any public class in other packages   stream  1 named package rather than the default package       implementation for all its instance methods unless the class is abstract specification 
final class   the keyword final before the keyword class in the class declaration an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class       A class that cannot have subclasses a class type whose instances are the values of the class type   abstractClasses  any public class in other packages      1 named package rather than the default package to increase system security by preventing system subversion     implementation for all its instance methods unless the class is abstract a subclass or the compiler will display an error message 
JApplet     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object    class to use Swing components    Applet classJava 2  a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programExample Classes  any public class in other packages   class  1 named package rather than the default package       implementation for all its instance methods unless the class is abstract specification 
main class     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class       The class which contains the main method and whose name is specified as an argument to the Java interpreter a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programClasses  any public class in other packages      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
Math     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   built-in class methods:
  • log(a) - natural logarithm of a
  • abs(a) - absolute value of a
  • max(a,b) - maximum of a and b
  • pow(a,b) - a to the bth power
  • sin(a) - sin of a radians
  • random() - a random number between 0.0 and 1.0
             a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programExample Classes  any public class in other packages   class  1 named package rather than the default package       implementation for all its instance methods unless the class is abstract specification 
nested class     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class       A class that is a member of another class a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programClasses  any public class in other packages      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
Object class     an implements clause to declare that it contains methods for each of the operations specified by the interface some of the behaviour that every class in the Java system needs   data associated with each object        java.lang  A class that is at the top of the class hierarchy a class type whose instances are the values of the class type   the most general of all classesObjects  any public class in other packages   class  1 named package rather than the default package       implementation for all its instance methods unless the class is abstract specification 
programmer-created exception classits class using the getClass method   use the new operatoran implements clause to declare that it contains methods for each of the operations specified by the interfaceother objects by sending and receiving messagesmore than one interface Exception classdata associated with each object   exception messages from messages to    several different variables at the same timea class type whose instances are the values of the class type 0 or more condition variables the unit of data abstraction in an object-oriented programException Handling String name = new String();any public class in other packageswithout reference to the instance variables contained in itmethods from other objects using the 'private' keyworda string using the toString method  itself to a string representation using the toString method1 named package rather than the default packageother objects that a condition variable has changed   public interface
  • declaring and initializing it such that it is created whenever execution enters a particular block, or, in the case of an instance variable, when an instance is created, for example:
    String aString = "some text";
  • or by declaring it and initializing it later using the new operator, for example:
    String aString;
    aString = new String("some text");
something goes wrong in the execution of a programimplementation for all its instance methods unless the class is abstractone copy of each class variable of its class with the other instances of its classa unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
public class  outside its package  an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface   data associated with each object   class         a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programClasses  any public class in other packages      1 named package rather than the default package       implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
System     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interfacejava.lang  data associated with each objectevery program          A class that is part of the API of Java and which provides system-independent access to system-dependent functionality a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programHow Java Works  any public class in other packages   class  1 named package rather than the default package to provide system-independent access to system-dependent functionality     implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 
Thread class     an implements clause to declare that it contains methods for each of the operations specified by the interface the Runnable interface  threaddata associated with each object           A Java class that implements the general concept of a thread a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programThreads  any public class in other packages   classstart, run, interrupt, sleep, yield, join, stop (deprecated), suspend (deprecated) the java.lang package       implementation for all its instance methods unless the class is abstract specification 
wrapper class     an implements clause to declare that it contains methods for each of the operations specified by the interface more than one interface  instance of wrapper classuseful class methods   class         a class type whose instances are the values of the class type   the unit of data abstraction in an object-oriented programClassesprimitive data type any public class in other packages      1 named package rather than the default package to allow you to do something with primitive values beyond what the basic operators can accomplish     implementation for all its instance methods unless the class is abstract a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash 

Next access unitconstructor    Upaccess unit, specification    Previous access unitvariable