The primary objective for creation of was the need for a platform-independent language that could be used to create software to be embedded in various consumer electronic devices. Java was convinced by James Gosling, Patrick Naughton, Chris Warth, Ed Frank and Mike Sheridan at Sun Microsystems, Inc in 1991. This Language was  initially called "Oak" but was renamed "Java" in 1995 

Java Drives much of it's character from C and C++. This is by intent. The Java Designer was knew that using the familiar syntax of C and echoing the object-oriented features of C++ would make their language appealing to the legions of experienced C/C++ programmers.

The Key consideration was summed up by the Java Programmers in the following list 

  • Simple
  • Secure
  • Portable
  • Object-Oriented
  • Robust
  • Multithreaded
  • Architecture-neutral
  • Interpreted
  • High Performance
  • Distributed 
  • Dynamic

Object-Oriented Programming Principle

All OOP languages provides the mechanism that help you implement the Object-Oriented Model. They are

  • Encapsulation
  • Inheritance
  • Polymorphism

Let's Start writing Your First Program in Java, for this use the slandered JDK( Java Developer's Kit), which is available from Sun Microsystems Or from download sites.  for ENet Download Section click

/* 
This is a simple java program
call this file "Example.java".
*/
class Example
   {
        //Your program begins with the call to main().
        public static void main(String[] args)
       {
          System.out.println("entering main()");
          System.out.println("This is Simple Java Program");
          System.out.println("exiting main()");
         }
   }

          

First thing you should learn is the name of the source file Example.java  because the compiler requires that a source file use the .java file name extension

Compiling Your First Program

To execute the Compiler, javac, specify the of the source file on the command line as shown below

                 c:\>javac Example.java

Javac Compiler creates a file called Example.class that contain the Bytecode version of the program

To Run The Program You must use the java interpreter called java. To do so pass the class name Example as a command-line argument as shown below

                 c:\>java Example

Now the Program will run

For Detail understanding of Java Visit Our Computer Section

 

Hosted by www.Geocities.ws

1