Tuesday, 4 June 2013

A simple Hello world Program



When we write a java program .. it is saved with the file name  ClassName.java(Make sure the extension is .java. the Classname.java file is compiled using the java compliler..
If the file complies successfully then a class file of the same name (Classname.class) will be generated.then the generated class file is executed .

SO lets start with the official "Hello world program"

Hello World Program

class HelloWorld    //Declare name of the main class, first lettershould becapital
{
public static void main(String arg[]])
{
System.out.println("Hello world");                     //Prints output on the screen
System.out.print("Welcome to Codsters, Clear your concepts and logics");
}
}


Java Introduction

Java is one of the most popular and most widely used programming language used in million of devices all around the globe. Java is widely used because of its features that it provides to the programmer can make applications and others software that provides easy and attractive user interface.

Java is an object oriented programming language that works on the basis of classes and objects. It follows bottom up approach during the execution of the program.

Following are some of the features of Java:

  • Inheritance : It is the process of creating the new classes and using the behavior of the existing classes by extending them to use the existing code and adding the additional features in the child class if needed along with the features of base class.Base classis the classfrom which the child class inherits or extends the features.

  • Encapsulation: : It is the mechanism of combining the information and providing the abstraction.

  • Polymorphism: :   It is the ability to take multiple forms, Polymorphism is the way of providing the different oprations to the functions having the same name but performing different tasks.

  • Dynamic binding :   It is the way of providing the maximum functionality to a program about the specific type at runtime.

  •  
    full details in json
    Proudly Powered by Blogger.
    back to top