Java   View all facts   Glossary   Help
specification
Next kbTopstate    UpkbTop    Previous kbTopscope   

specification comparison table
Subject have syntax rule add declare protect is a subtopic of name after access be only accessible to create access by extend implement by has part provide place in represent inherit return to contain have purpose is a synonym of pass as have example instantiate you implement import from be part of belong to specify how order be a descendant of define specify by have access modifier compile by hide use override have syntax have benefit be a member of have have part return has definition be is partitioned into abbreviate as
Application Programming Interface    How Java Works                        a programmer accesses the behaviour and state of classes and objects               The specification of how a programmer writing an application accesses the behaviour and state of classes and objects  API
class
bold = mandatory
italic = non-terminal
normal font = optional
0 or more methods to the methods it inherits from its superclassa list of variables, called instance variables, corresponding to data that will be present in each instanceits members from access by other classes or objects using an access modifierClassesthe internals of a computer system such as 'Record', 'Table', 'Data', 'Structure', or 'Information'any public class in other packages   only one superclass  implementation for all its instance methods unless the class is abstractits own source fileseveral similar objectsbehaviour from its superclass data associated with each object   
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
create an instance of itmore than one interfacea package   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
Object classa class type whose instances are the values of the class type1 class definition  an implements clause to declare that it contains methods for each of the operations specified by the interfacemethods that are inherited from the class's superclass
class classname
{ // declarations of variables
// declarations of constructors
// declarations of other methods with public ones first
}
1 named package rather than the default packagea unique name since somebody in the future might want to import the packages containing both classes and hence create a name clashconstructor A template that describes the data and behaviour of its instances called objectsthe unit of data abstraction in an object-oriented programabstract class, concrete class 
interface
bold = mandatory
italic = non-terminal
normal font = optional
   Interfaces  classes that are defined in the same package unless the interface is public   1 or more interfaces1 or more class many of the same benefits as multiple inheritance  all constants and methods from its superinterfaces abstract methodsabstract data type 
public interface Drawable
{
public abstract Image drawImage();
public abstract Image drawImage(int height, int width);
public abstract Image drawBlackAndWhiteImage(int height, int width);
}
        a set of methods public, or nonethe Java compiler into a .class file   
public interface InterfaceName extends SuperInterfaces
{
InterfaceBody
}
 1 named package1 or more superinterfacesinterface definition A named collection of method declarations (without implementations), may also include constant declarations (variables marked static and final)abstract by definition - the modifier is optional in the declaration  
method
bold = mandatory
italic = non-terminal
normal font = optional
   Methods all instance variables of all objects of its class an object by instantiating a classother methods and variables in any class in the same package by default  a block of implementation code    its caller from only one place which should be the last statementreturn statement unless it has a void return type member functionan argument to a method or constructor   a class or an objecta class   its return type  instance variables, class variables from other objectsthe super method to invoke a method declared in the superclassa method in a superclass with the same name   a comment at its head if the method is non-obviousmethod signaturea value that is of the return type of the method or a subtype of that typeCode that specifies some of the behaviour of a class or instancepublic except for those that will definitely need to be called from outside the packagestatic method, instance method 
virtual machine    How Java Works                                just-in-time compilation       An abstract specification for a computing device that can be implemented in different ways, in software or hardware  VM

Next kbTopstate    UpkbTop    Previous kbTopscope