1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Whats so great about Java ?

Discussion in 'Java' started by shabbir, May 21, 2009.

  1. priya456

    priya456 New Member

    Joined:
    Jul 7, 2017
    Messages:
    26
    Likes Received:
    2
    Trophy Points:
    3
    Gender:
    Female
    Java is a programming language in the tradition of C and C++. As a result, if you have any experience with C or C++, you’ll find yourself in familiar territory often as you learn the various features of Java.

    Java differs from other programming languages in a couple of significant ways. The following sections describe the most important differences.
     
    Last edited by a moderator: Oct 5, 2017
  2. meenal deshpande

    meenal deshpande New Member

    Joined:
    Oct 11, 2018
    Messages:
    20
    Likes Received:
    2
    Trophy Points:
    3
    Gender:
    Female
    Java is a programming language in the tradition of C and C++. As a result, if you have any experience with C or C++, you’ll find yourself in familiar territory often as you learn the various features of Java.

    However, Java differs from other programming languages in a couple of significant ways. The following sections describe the most important differences.

    PLATFORM INDEPENDENCE
    One of the main reasons Java is so popular is its platform independence, which means that Java programs can be run on many different types of computers. A Java program runs on any computer with a Java Runtime Environment, also known as a JRE, installed. A JRE is available for almost every type of computer — PCs running Windows, Macintosh computers, Unix or Linux computers, huge mainframe computers, and even cell phones.

    OBJECT ORIENTATION
    Java is inherently object-oriented, which means that Java programs are made up of programming elements called objects. Simply put, an object is a programming entity that represents either some real-world object or an abstract concept.

    All objects have two basic characteristics:

    • Objects have data, also known as state. For example, an object that represents a book has data such as the book’s title, author, and publisher.
    • Objects also have behavior, which means that they can perform certain tasks. In Java, these tasks are called methods. For example, an object that represents a car might have methods such as start, stop, drive, or crash. Some methods simply allow you to access the object’s data. For example, a book object might have a getTitle method that tells you the book’s title.
    Classes are closely related to objects. A class is the program code you write to create objects. The class describes the data and methods that define the object’s state and behavior. Then, when the program executes, classes are used to create objects.

    For example, suppose you’re writing a payroll program. This program needs objects to represent the company’s employees. So, the program includes a class (probably named Employee) that defines the data and methods for each Employee object. Then, when your program runs, it uses this class to create an object for each of your company’s employees.
     
    Last edited: Nov 30, 2018
  3. sayalipatil

    sayalipatil New Member

    Joined:
    Dec 18, 2018
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Female
    Home Page:
    Practically speaking, Java is great because it allows you the developer to write code against one runtime that is mostly consistent between platforms (excluding the UI).

    It’s also easier to learn than C, which makes it perfect for CS and most corporate software. The Java naming conventions are relatively standardized, so it’s not a lot of work to use libraries etc. And it’s safe; even if you screw something up horribly in Java you won’t cause a machine-level compromise.
     

Share This Page