Sunday, 24 May 2015

Overview of Java Language

Java is a general-purpose, object-Oriented programming language. We can develop two types of java programs.

  • standard alone applications.
  • web applets.

standard alone applications

                                     These are programs written in java to carry out certain tasks on a standard alone local computer. In fact, Java can be used to develop programs for all kinds of applications, which earlier, we developed suing languages like C and C++.

                       Executing a standard alone java program involves two steps.
Compiling source code into bytecode suing 'javac' compiler
Executing the bytecode program using java interpreter.

Web Applets

                     These are small java programs developed for internet applications. Standard alone programs can read and write files and perform certain operations that applets cannot do. An applet can only run within a web browser or Appletviewer.

 How to read data into java programs ?

                                                                 There are various ways to read input from the keyboard, the java.util.Scanner class is one of them. The java Scanner class breaks the input into tokens using a delimiter that is white space by default. It provides many methods to read and parse various primitive values.

                 The java Scanned class is widely used to parse text from staring and primitive types regular expression. It uses nextXXX() methods for this purpose.

     For Example

                   Scanner scr = new Scanner(;       // creating an object to scanner class.
                   System.out.println(" enter your roll no");
                   int rollno=scr.nextInt();        // reading the integer value into variable " rollno".



Post a Comment

Note: only a member of this blog may post a comment.

Find Us On Facebook

python tutorial


C Programming


Java Tutorial


Data Structures


MS Office


Database Management