Thursday, October 13, 2011
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
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.
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
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.