Thursday, October 13, 2011

Creating and Running an Employee Java Application


Creating a Java Application.


You need to create an Employee class that consists of various data members, such as employeeName, employeeAge, employeeSalary, employeeId. The application must initialize the data members to default values when an object of the Employee class is created. In addition, the application must display the data stored in the object.

To solve the above given problem, the things needs to be done.
1. Code the application
2. Compile and execute the application.

Tuesday, October 11, 2011

Access Specifiers and Modifiers in Java Programming Language


Access Specifiers and Modifiers
Classes enable an object to access data variables or methods of another class. Java provides access specifiers and modifiers to decide which part of the class, such as data members and methods will be accessible to other classes or objects and how the data members are used in other classes and objects.

Access Specifiers
An access specifier controls the access of class members and variable by other objects. The variouse types of access specifiers in Java are:

Monday, October 3, 2011

Structure of a Java Application, Introduction to Classes and Object


Structure of a Java Application, Introduction to Classes and Object

In Java, you can either create a Stand-alone application or a networked application. a stand-alone application uses the resources of a local computer while a networked application uses resources available over a network.  Classes and object form the basis of the structure of a Java application. A Java application consists of a class, in which you declare the data members and methods. An object is an instance of a class and it encapsulates the method and data members of a class.
Creating Classes, Objects and Methods
All concepts that you need to implement in a Java application is encapsulated within a class. A class defines the attributes and methods of objects of the same type sharing common characteristics.

Monday, September 19, 2011

Declaring Variable and Literals, Data Types, Keywords in Java

Declaring Variable and Literal
Java supports some basic programming elements, such as data types, keywords, literals and variables. Keywords are the reserved words for Java programming language, which cannot be used as names for variables, class or methods.

Various Data Types
The data stored on memory of the computer can be of different types. For example, a person’s age is stored as a numeric value and an address is stored as alphanumeric characters. Java is a strictly typed language, which means that Java gives importance to type checking. Expressions and variables in Java can be of different types, such as int, char, or string. Data Types in Java are divided into two categories as stated below:
  • Primitive or the simple data types
  • Abstract or the derived data types

Tuesday, September 6, 2011

How to run Java Application on NetBeans IDE

How to run an application on NetBeans IDE.

To write your first program, you'll need:
  1. The Java SE Development Kit 6 (JDK 6)
  2. The NetBeans IDE

Create an IDE Project

Running your first Java application from the command prompt for user of Microsoft Windows

Running your first Java application from the command prompt for user of Microsoft Windows

To write and run your first Java application on Microsoft Windows, you’ll need the following:
  1. The Java SE Development Kit 6 (JDK 6)
You can download the Windows version from http://java.sun.com/javase/6/download.jsp. you can Consult the installation instructions.
  1. A Text Editor
We’ll be using Notepad, a simple editor included with the Windows Platform. These two items are all you’ll need to write and run your applications.

Creating Your First Application

Sunday, September 4, 2011

Installing Java Standard Edition Development Kit (JDK) and Setting the PATH Environment Variable


Installing Java Standard Edition Development Kit (JDK)

From my next post, we shall start running Java applications. Before you can start running applications, you must first install the Java Standard Edition Development Kit (JDK) 6 or a Java Development tool that supports Java SE 6 (Example like NetBeans IDE). I shall also explain how to install and run your first application on NetBeans IDE.

Wednesday, August 31, 2011

Introduction to Java Programming Language

Introduction to Java Programming Language

Java is an Object Oriented Language that was designed to meet the need for a platform independent language. Java is used to develop applications that can run on a single computer as well as on a distributed network. Java is a language that can be used to develop stand-alone and internet-based applications. A Java application works everywhere, from the smallest devices, such as remote controls and microwave ovens to supercomputers. One good thing about Java programs is that they are independent of the type of computer, telephone, television or operating system these devices run on.  Java programs work on any type of compatible devices that support Java.

Need for Java

Saturday, August 27, 2011

Features of Object Oriented Programming


Features of Object Oriented Programming


Objects are the basic building blocks of Object Oriented Programming System. The real world objects have tow characteristics: State and behaviour. For example, human beings have state, such as name, color, age and height and behaviour such as walking and dancing. All the Objects in OOPS are based on real world having a specific state and behaviour.

Object Oriented Programming System consists of the following features:

  1. Encapsulation
  2. Abstraction
  3. Inheritance
  4. Polymorphism

Thursday, August 25, 2011

Advantages of Object Oriented Programming


Advantages of Object Oriented Programming

As discussed in my previous post, Object Oriented Programming enables you to reuse various components of a program across programs. Reusability of codes not only saves time but also the effort of the programming team.

Some of the advantages of Object Oriented Programming include:

  • Real world programming
  • Reusability of codes
  • Modularity of codes
  • Information hiding
Let’s try and discuss each of these advantages in details.