Java-Part 4

Java 2-Part 3   Index   Java 2- Part 5
*Java was developed by “Sun Micro Systems USA in 1991. It was first called as OAK

*Patrick Naughton

  • 1990 – Started
  • 1991 – OAK
  • 1992 – Applied to handheld cameras etc.,
  • 1993 – www & tiny applets
  • 1994 – Hot JAVA(Web browser)
  • 1995 – OAK–>JAVA
  • 1996 – JAVA found its home

*It is developed as garbage collection language, relieving programmers problems of virtually all memory management problems. Java supports functions written in other language such as C, C++, that functions called as “native methods”

*Java has a new operator [instanceof].

*First application program written in java is -“Hot Java”

*IE uses “JIT”

*The Development tools are part of the system known as JDK(Java Development Kit).

*The classes & methods are part of the “Java Standard Library, also known as “Application Programming interface.

*A Thread is a separate flow of control in a program. It differs from process by it stores same memory area. Java Runtime System creates the threads.

*Most platforms doesn’t support unicode characters. As a result java programs are written with special unicode escape sequences. Escape sequences tells that its a ASCII encoded unicode character.

*Java Garbage Collector uses “Conservative mark & sweep system to collect memory.

*noasyncgc => command line to turn of the java garbage collection.

*The methods of interface are always considered as public.

*Java.io.Serializable interface doesn’t have any methods & variables so it is best example for empty interface.

*There can be only one public interface declared in single compilation unit.

*”Covariance” is a concept that can be occured in Arrays.

*Marker/Empty Interfaces.

  1. Serializable
  2. Comparable
  3. Clonable

*Every object has “toString()” & it is used by PrintStream object. “hashCode()” which is produced by object class for every instance of the class. Object class can use “clone()” to make copies of object, by default it is turned off.

*”newInstance()” =>It has the ability to return any type of constructed object. We can create class instances using “Class.newInstance()”. But you can’t specify the arguments.

*The stack trace always shows the sequence of method invocations that led up to the error.

*RegularExpression is a string of characters that describes a character sequence. 2 classes that support RegularExpression

  1. Pattern
  2. Matcher

*Pattern is created by calling the “compile()” factory method. “find()” matches the longest sequence that fits the pattern. This is called greedy behavior.

*Reflection is an important capability needed when using components called “java beans”.

*It allows you to analyze software component & describe its capabilities dynamically at runtime rather than at compile time.

*RMI allows a java object that executes on one machine to invoke a method of java object that executes on another machine. It is used to build distributed applications.

*Steps to RMI

  1. Enter/Compile source code
  2. Generate stub/skelton
  3. Install files on the client and server machine.
  4. start the RMI registry on the server
  5. start the server
  6. start the client.

Java 2-Part 3   Index   Java 2- Part 5

3 thoughts on “Java-Part 4

Leave a comment