Skip to main content

Posts

click and get money <a href="https://www.vultr.com/?ref=7265462"><img src="https://www.vultr.com/media/banner_2.png" width="468" height="60"></a>
Recent posts

Abstraction

Abstraction means ignoring irrelevant features, properties, or functions and emphasizing the relevant ones...relevant to the given project (with an eye to future reuse in similar projects).

Encapsulation

You can take two views of an object: internal - the structure of its data, the algorithms used by its methods external - the interaction of the object with other objects in the program From the external view, an object is an encapsulated entity, providing services These services define the interface to the object An object should be self-governing Any changes to the object's state (its variables) should be accomplished by that object's methods We should make it difficult, if not impossible, for one object to "reach in" and alter another object's state The user, or client, of an object can request its services, but it should not have to be aware of how those services are accomplished (abstraction - hide details).

Polymorphism

Polymorphism Enables “programming in the general” The same invocation can produce “many forms” of results Interfaces Implemented by classes to assign common functionality to possibly unrelated classes  Polymorphism When a program invokes a method through a superclass variable, the correct subclass version of the method is called, based on the type of the reference stored in the superclass variable The same method name and signature can cause different actions to occur,  depending on the type of object on which the method is invoked Polymorphism enables programmers to deal in generalities and let the execution-time environment handle the specifics. Programmers can command objects to behave in manners appropriate to those objects, without knowing the types of the objects (as long as the objects belong to the same inheritance hierarchy).  Promotes extensibility New objects types can respond to existing method calls Can be incorporated into a system ...

inheritance in java

Inheritance allows a software developer to derive a new class from an existing one The existing class is called the parent class, or super class, or base class The derived class is called the child class or subclass. As the name implies, the child inherits characteristics of the parent That is, the child class inherits the methods and data defined for the parent class To tailor a derived class, the programmer can add new variables or methods, or can modify the inherited ones Software reuse is at the heart of inheritance By using existing software components to create new ones, we capitalize on all the effort that went into the design, implementation, and testing of the existing software Inheritance relationships often are shown graphically in a UML class diagram, with an arrow with an open arrowhead pointing to the parent class Examples  ex 1  ex 2

Java Platform Standard Edition 8 Documentation

Oracle has two products that implement Java Platform Standard Edition (Java SE) 8: Java SE Development Kit (JDK) 8 and Java SE Runtime Environment (JRE) 8. JDK 8 is a superset of JRE 8, and contains everything that is in JRE 8, plus tools such as the compilers and debuggers necessary for developing applets and applications. JRE 8 provides the libraries, the Java Virtual Machine (JVM), and other components to run applets and applications written in the Java programming language. Note that the JRE includes components not required by the Java SE specification, including both standard and non-standard Java components. The following conceptual diagram illustrates the components of Oracle's Java SE products: Description of Java Conceptual Diagram

History of Java

1990 Oak (interactive television, big failure) 1994 Java (for the Internet) Main feature: "Write Once, Run Any Where" => wrap the operating system so they all look the same Designed for A fresh start (no backward compatibility) “Pure” OOP: C++ Syntax, Smalltalk style Improvements over C++ much harder to write a bad program  Internet programming Very hard to create a virus  Run in a web browser (and at the server) There is a speed issue (from Java 1.3 and up much better) C# Microsoft's “Java-Killer” project release 2001 Language very similar to Java   Commen-Language Runtime (CLR) supports 30+ languages