E

     
Encapsulation

A concept in object-oriented programming that dictates that the implementation of data and behavior within an object must be hidden, exposing only a public (client- facing ) view of the interface, thereby enforcing a contract for acceptable client interaction with the object. Encapsulation of your code increases portability and reuse, and is a very good thing to do. Ways of encapsulating your code include making private variables , with public getX() and setX() methods .



error

A state from which a program cannot recover. java.lang.Error is a subclass of java.lang.Throwable, and is the parent class of all Java error classes. A runtime error can occur in the following circumstances: when an exception is not caught by any catch block (in which case the controlling thread invokes the uncaughtException method and terminates), when you try to cast a class into a type that it cannot be cast to (in which case a ClassCastException is thrown), or when you try to store an object in an array meant to hold different object types (in which case an Array StoreException is thrown). There are also LinkageErrors , which are thrown when a loading, linkage, preparation, verification, or initialization error occurs in the classloader.



exception

A programmatic state that subverts the normal flow of execution. Exceptions should be handled by anticipating the possibility of their occurrence, and surrounding the potentially problematic code with a try/catch block.



extends

A Java keyword to indicate that the current class is a subclass of the class it extends. By extending a class, a class inherits the functionality defined in its parent class (also called the superclass). This functionality can then be added to or, if the parent data item is not declared final, overridden.





Java Garage
Java Garage
ISBN: 0321246233
EAN: 2147483647
Year: 2006
Pages: 228
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net