Introduction to Java

Java is a programming language as well as a platform. Java provides several exciting features that make programming convenient and easier. It can be used to create various types of computer applications. It is designed to deliver and run highly interactive, dynamic and secure applications on a networked computer system. James Gosling developed Java at Sun Microsystems. There are two types of java programs: Internet applets and Standalone applications. Internet applets are small programs that are embedded in web pages and run on the viewers’ machine in secured manner. Stand alone application is a software application that does not require low level operating system and hardware access.

When Java programs are compiled, they give an intermediated code known as ‘Byte Code’. Java byte code is a machine instruction for a Java processor chip called Java Virtual Machine (JVM). Java Platform is a combination of hardware (JVM) and software (Java API’s). The basic structure of Java programs include comments in a program/document section, declaration of class, opening of curly brace ‘{’ to indicate the beginning of class, declaration of main function, opening of curly brace ‘{’ for indicating the beginning of the main function, termination of several statements with semicolon (;) and closing of curly brace ‘}’ for indicating the closing of the main function and class.

To Access the full content, Please Purchase

  • Q1

    What is JVM?


    Programs in Java are compiled into Java byte code. Then, they are interpreted by a special Java Interpreter for a specific platform. This Java interpreter is Java Virtual Machine (JVM).

    • The machine language for the JVM is called byte code.

    • JVM is an abstract machine designed to be implemented on top of existing processors.

    View Answer
  • Q2

    How can you say that Java is platform-independent language?


    Java is platform-independent language as Java programs can run on any platform. The Java compiled program can run on any operating system because when we compile a program we get a class file which contains byte code, which is specific to Java. This byte code is interpreted by JVM (interpreter) into machine understandable code. So, only the interpreter and a few native libraries need to be ported to get Java to run on a new computer or operating system.

    View Answer
  • Q3

    What is byte code?


    The Java Byte Code is a machine instruction for a Java processor chip called Java virtual machine. The byte code is independent of the computer system it has to run upon.

    Java programs are compiled and their byte codes are produced. The byte codes are always exactly the same irrespective of the computer system they are to execute upon.

    View Answer
  • Q4

    Give a brief history of Java.


    Java was originally developed to find a way of allowing different electronic devices to use a common language. From 1991 when it was developed and named as Oak, there had been many progressive versions released and in 2006, the NetBeans IDE 5.0 was released.

    The history of Java can be found out in the Java timeline given below:


    James Gosling developed Oak(later named Java)


    World wide Web explodes


    Java incorporated into Netscape web browser


    Java Development Kit (jdk) 1.0 ships


    JDK 1.1 launched, Java Servlet API releases


    JDK 1.2 launched, Sun produces a JDK 1.2 for Linux


    JDK 1.3 released


    Java support for web services released


    Java Enterprise System 2005Q4 released


    NetBeans IDE 5.0 released

    View Answer
  • Q5

    Is Java a programming language or a platform? Give reasons.


    Java is both a programming language and a platform. Like any other programming language, it can be used to create various types of computer applications. The word platform is used to refer to some combination of hardware and system software. Java is a software platform designed to deliver and run highly interactive, dynamic and secure applications.

    View Answer