<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-928005603959840372</id><updated>2011-06-08T13:11:20.789+08:00</updated><category term='IBM'/><category term='Websphere'/><category term='OOPS'/><title type='text'>IDYN Solutions</title><subtitle type='html'>Integrated Dynamic Solutions</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://idynsolutions.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/928005603959840372/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://idynsolutions.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Editor</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-928005603959840372.post-6202025669823536423</id><published>2006-10-16T12:14:00.000+08:00</published><updated>2006-10-16T12:22:06.997+08:00</updated><title type='text'>OOP Part 2 - Objects And Variables</title><content type='html'>&lt;span style=";font-family:trebuchet ms;font-size:130%;"  &gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Instantiating an Object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:85%;"&gt;An Object is an instance of a Class. After creating an Object, you can access the member variables and methods of the object and assign values to them. An Object is declared in the same way that a variable of a primitive type is declared.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;String sampleStr; //This code is used to define an object name of String type.&lt;/blockquote&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;You can define a varibale that will be used to refer to an object or an instance of a class.&lt;br /&gt;&lt;br /&gt;When you create an object, you need to assign memory to the object. This is done using the new operator. The new operator is followed by the class name and parentheses. The syntax for creating an object is displayed below:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;class_name variable_name = new class_name();&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Example:&lt;/span&gt; Test aTest = new Test();&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;This code is used to create an instance of the Test class. The variable aTest is decleared. Notice that this is an arbitary variable name. This variable is used to refer to the instance of the Test class. You can also state that the name of this particular Test instance is aTest.&lt;br /&gt;&lt;br /&gt;When multiple instances are created, each instance maintains a seperate copy of the member variables of the class.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-style: italic; font-weight: bold;"&gt;Post is not yet complete&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/928005603959840372-6202025669823536423?l=idynsolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idynsolutions.blogspot.com/feeds/6202025669823536423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=928005603959840372&amp;postID=6202025669823536423' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/928005603959840372/posts/default/6202025669823536423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/928005603959840372/posts/default/6202025669823536423'/><link rel='alternate' type='text/html' href='http://idynsolutions.blogspot.com/2006/10/oop-part-2-objects-and-variables.html' title='OOP Part 2 - Objects And Variables'/><author><name>Editor</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-928005603959840372.post-5572346613533237002</id><published>2006-09-30T03:05:00.000+08:00</published><updated>2006-09-30T03:35:11.449+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>OOP Part 1 - Classes, Methods and Objects</title><content type='html'>&lt;h1 style="COLOR: rgb(75,99,32)"&gt;&lt;h1 style="FONT-WEIGHT: bold; FONT-SIZE: 20px"&gt;&lt;span style="font-size:180%;"&gt;Advantages Of OOP&lt;/span&gt;&lt;/h1&gt;&lt;/h1&gt;&lt;span style="COLOR: rgb(75,99,32);font-size:85%;" &gt;OOP provides advantages over traditional structural programming languages. OOP facilitates writing applications by turning real-world objects into code components. OOP enables users to model real-world objects. Modeling means representing real-world objects as components in Java. Object-Oriented Programming allows programmers and customers to use the same terminology to explain the business domain and the program.&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;h2 style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold;font-size:100%;" &gt;In Summary:&lt;/span&gt;&lt;/h2&gt;&lt;ul style="COLOR: rgb(75,99,32)"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Enables the use of real-world modeling&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="COLOR: rgb(75,99,32)"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Promotes the reuse of code&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="COLOR: rgb(75,99,32)"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Provides flexibility in the modification of an existing application&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="COLOR: rgb(75,99,32)"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Helps with the maintainability of code.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="COLOR: rgb(75,99,32);font-size:85%;" &gt;Lets go in detail with the advantages...&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;h2 style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold;font-size:100%;" &gt;Enables the use of real-world modeling&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;Consider an example. A car is an object that has specific attributes, such as an engine and wheels. Using OOP principles, you would model the car as a car object in Java that would have the same properties.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;Creating applications that model the real world closely enables developers to understand an application faster than any other applications. Therefore, an application that implements OOP concepts effectively is implemented and used.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;h2 style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold;font-size:100%;" &gt;Promotes the reuse of code&lt;/span&gt;&lt;/h2&gt;&lt;span style="COLOR: rgb(75,99,32);font-size:85%;" &gt;Another advantages of OOP is that it promotes the reuse of code. The code used to define an object can be shared by several objects of an application. For Eg: the code used to design a type of car can be used for designing different types of cars. This saves you from rewriting code for various types of cars. A benifit of code reuse is that it reduces the amount of code to write, debug, test, and possibily upgrade in the future.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;h2 style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold;font-size:100%;" &gt;Provides flexibility in the modification of an existing application&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;OOP promotes flexibility in the design and implementation of a solution. Maintainance and upgrades are seen as further cycles in application development. By using OOP practices, applications become easier to extend.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;Consider an example of XYZ Corporation. The application used by the production department of this organization is currently designated to create two types of chairs, plastic and metal. To meet the demands of its customers, the organization decides to produce wooden chairs as well. To meet the change in the requirement, the XYZ corp. needs to incorporate changes into its current application system. If the current system was built using OOP best practices, extensions to the system may be simplified. For Eg: the new chair type would be able to share or reuse some of the other chair types' code.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;h2 style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold;font-size:100%;" &gt;Helps with the maintenance of Code&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style="COLOR: rgb(75,99,32);font-size:85%;" &gt;Finally, OOP helps in the maintenane of code. By using OOP, you can create seperate components for different requirements. In OOP, a component is known as a class. For example, to design a payroll system of an organization, you could create classes such as Employee and Payroll. By creating the Employee and the Payroll classes, information related to each class can be segregated. An internal change in one of these classes should not affect the functionality of the other class. Therefore, the maintenance of a system is simplified by reducing dependencies in between classes.&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-US" style="COLOR: rgb(75,99,32);font-size:15;" &gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;OOP Design Principles&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/span&gt;&lt;p class="MsoBodyText" style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;An application that implements Object-Oriented Programming (OOP) concepts is distinguished by four design principles. The four design principles are encapsulation, abstraction, inheritance, and polymorphism. &lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;h2 style="MARGIN-LEFT: 0cm; COLOR: rgb(75,99,32); TEXT-INDENT: 0cm"&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt;&lt;span style="font-size:100%;"&gt;Encapsulation &lt;/span&gt;&lt;p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p class="MsoBodyText" style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;Encapsulation hides the inner workings of an object from outside users of the object. This protects outside users from making internal changes or optimizations to such objects. The object needs only to maintain its external functionality to support its clients. Internal details, such as data representation, should not be accessible externally.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoBodyText" style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Abstraction&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;The principle of abstraction is modelling real-world objects as objects in Java. However, these objects are only modeled at a certain level of detail. Only the behaviour and data that is needed by your application will be included in your model.&lt;br /&gt;&lt;br /&gt;The abstraction design principle focusses on the essential characteristics of an object. In OOP, abstraction defines the conceptual boundaries of an object. These boundaries distinguish one type of object from another. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoBodyText" style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Inheritance&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoBodyText" style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;The inheritance design principle allows a class to inherit the characteritics of another class. When inheritance is used in an application, the application consists of classes that are arranged in hierarchies. The classes defined at the lower levels of a hierarchy inherit from the classes higher up in the hierarchy.&lt;br /&gt;&lt;br /&gt;By creating a hierarchy of classes, the characteristics and code of a class are made reusable. A class can inherit characteristics from other classes and provide additional features. The new class has its own attributes and the attribtues of the existing class. This feature provides extensibility and reusability in classes.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoBodyText" style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Polymorphism&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Polymorphism refers to the ability of an object to take on different forms depending upon the situation. Consider an example of a class Sedan that inherits from the class Car that inherits from the class Vehicle. An instance of the Sedan class can be referred to as a Sedan, a Car, or a Vehicle.&lt;br /&gt;&lt;br /&gt;Polymorphism provides flexibility to an application based on requirements. It simplifies coding and reduces the rework involved in developing and modifying an application. This is because different types of objects can react to the same type of stimulus.&lt;/span&gt; &lt;/p&gt;&lt;p class="MsoBodyText" style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:180%;"&gt;Classes and Objects&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The idea of Object-Oriented Programming (OOP) is to place data and methods together in a single entity. The single entity holding the data and methods is called a class. An Object is an instance of a class.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;To create a Java application, you organize programming structures by creating classes that consist of reusable code. You can create a class in Java to perform simple tasks, such as declaring the member variables of the class and perhaps initializing the member variables by using the methods of the class.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;span style="COLOR: rgb(75,99,32);font-size:85%;" &gt;An instance of a class is declared the same way that a primitive data type is declared. A class defines both data and methods. You can reuse the same class in several applications withoug rewriting it. You can create as many instances or objects of a class as needed. When multiple objects are created, each object maintians a seperate copy of the member variables defined by the class.&lt;br /&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold;font-size:130%;" &gt;Creating a Class&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;ol style="COLOR: rgb(75,99,32)"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Specify the class name. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Declare data members. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Declare methods. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Define the processing.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;In order to define a class, you must specify the class name, declare the member variables, and declare the methods of the class.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;There are certain naming conventions that should be followed when naming a class. First, class names should be nouns. The first character of the class name should be upper case, and each internal word of the name should be upper case. The rest of the characters in the name should be lower case. The words in the name should be whole words. Acronyms and abbreviates should be avoided.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;In addition, you must define the processing that is required for the method. For example, operations such as addition or substraction on member variables can be specified in the methods. The contents of the class definition are enclosed within braces.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;table style="WIDTH: 491px; COLOR: rgb(75,99,32); HEIGHT: 250px" cellpadding="7" rules="all" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="WIDTH: 100%"&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;public class Rectangle {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    //class name and Body begins now...&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    int length=10;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    int width=5;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    String color;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;    void calculateArea() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;      //method declartion&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;      int totArea = length * width;//processing&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;      System.out.println("The total area is " + totArea);&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    }&lt;/span&gt;&lt;/pre&gt;&lt;div style="TEXT-ALIGN: left"&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}//end class body&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;&lt;span style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; COLOR: rgb(75,99,32); PADDING-TOP: 1px; BACKGROUND-COLOR: rgb(255,255,204)"&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;Consider the Rectangle class shown above. It consists of the class keyword followed by the class name. The class body befins with an opening brace. The class body consits of member variables and a method. In the method declaration, the member variables are accessed and processed. To end the class declaration you use a closing brace.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;A class declared in Java usually contains an access modifier. The access modifier determines the type of access other classes and objects can have to a specific class and the fields and methods that it defines. In our example, Rectangle class is declared using "public" access modifier meaning it can be accessed by anyone.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Access Modifiers&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The access modifiers that can be used while declaring a class are &lt;/span&gt;&lt;span style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-WEIGHT: bold; PADDING-BOTTOM: 1px; COLOR: rgb(75,99,32); PADDING-TOP: 1px; BACKGROUND-COLOR: rgb(255,255,204)"&gt;public, private, and protected&lt;/span&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;. When the class is declared without an access modifier, the class is accessible by the other classes in the current package. when a class is declared with the public access modifier, the class is accessible by all the other classes.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The private and protected access modifiers may only be used on inner classes. They cannot be used for top-level classes. When a class is declared with the private access modifier, the class is not accessible by any other classes. When a class is declared with the protected access modifier, the class is accessible by subclasses of the class.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;In addition to the access modifiers, the modifiers &lt;/span&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;final, abstract, and strictfp&lt;/span&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt; may be specified.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;If the &lt;/span&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;final modifier&lt;/span&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt; is specified, the class represents a complete class and cannot be overridden by a subclass. &lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The &lt;/span&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;abstract modifier&lt;/span&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt; is used to declare that a class is considered incomplete. An abstract class may have abstract methods that are not implemented within the class.The final modifier cannot be used with the abstract modifier.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The &lt;/span&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;strictfp modifier&lt;/span&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt; is used to force the code within the entire class to use strict floating-point logic. This applies to all float and double values that are used within the class.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold;font-size:130%;" &gt;Declaring Methods&lt;br /&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;A class is defined by its state and behaviour. The member variables of the class define the state of the class. The methods of a class define the behaviour of the class.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;Consider an example, To add the values stored in the member variables of a class, you declare a method that operates on these member variables to compute their sum. The result can be displayed by another method that calls the computed method.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The six basic components of a method include the access modifier, other modifiers, the return type of the method, the name of the method, a list of the arguments passed to the method, and the body of the method.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;table style="WIDTH: 488px; COLOR: rgb(75,99,32); HEIGHT: 175px" cellpadding="7" rules="all" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="WIDTH: 100%"&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;&amp;lt;access modifiers&amp;gt; &amp;lt;other method modifiers&amp;gt;&lt;br /&gt;&amp;lt;return type&amp;gt; methodName(arg1, arg2, ...) {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;    //method body&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;Access Modifier&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;It is a Subset of the method modifier group. This specifies the type of access granted to other objects for that method. You can declare a method public, private, or protected. If no access modifier is specified, the method is accessible to all classes in the current package. A public method may be accessed from any class. A protected method may be accessed from any subclass of the class in which the method is defined. A private method may only be accessed from within the class in which it is declared.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;table style="WIDTH: 524px; COLOR: rgb(75,99,32); HEIGHT: 1097px" cellpadding="7" rules="all" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="WIDTH: 100%"&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;void myPackageMethod() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    // This method may be accessed from any&lt;br /&gt;    //class declared in the same package&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;public void myPublicMethod() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    //This method may be accessed from any class&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;private void myPrivateMethod() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    // This method cannot be accessed from other classes.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;protected void myProtectedMethod() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    // This method may be accessed from any&lt;br /&gt;    //subclass of the class that declares it.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;public final void myFinalMethod() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    // This method cannot be overridden or hidden&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;public abstract void myAbstractMethod();&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;//This method must be overridden to create a concrete class&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;public static void myStaticMethod() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    //Do Work&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;public native void someExternalMethod(String name);&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;public strictfp void myStrictFpMethod() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    // All float and doubles use strict floating point logic.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;public syncrhornized void mySynchronizedMethod() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    //Multiple threads will not be able to&lt;br /&gt;    //access this method at the same time.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;Other Method modifiers&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;In addition to the access modifiers, the modifiers static, final, abstract, native, strictfp, and synchronized may be specified.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;Static method are scoped to the class and not to the instance of the object. These methods may be called without an instance of the class being created. These methods may be called without an instance of the class being created. They may access static variables, but do not have direct access to member variables.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;If the final modifier is specified, the method cannot be overridden or hidden by a subclass. The abstract modifier is used to declare that a method is not implemented in a class. In this case, the method must be implemented by a subclass in order to create a class that can be instantiated. This final modifier cannot be used with the abstract modifier.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The native modifier is used to define a class that is implemented in code external to the Java Code. This is typically used to allow a Java application to call code in languages such as C++.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The strictfp modifier is used to force the code within the method to use strict floating-point logic. This applies to all float and double values that are used within the method.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The synchronized modifier is used when access to the method needs to be synchronized in order to prevent multiple threads from accessing it at the same time. This can be used to keep multiple threads from modifying variables or accessing resources at the same time.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;Return Type&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The return type of the method indicates the return type of the method. The return type of the method indicates the type of value that the method provides to a calling method. The return type is specified by a primitive or object data type, such as void, int, char, String, or Date. The return type is always followed by the method name.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;Method Name&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;A method name that follows the int data tyoe would signify that the method returns a type integer when its is involved. Note if the method does not return any type, the method name is preceded by the void return type.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The method name is user-defined and should be meaningful. According to Java variable naming conventions, if a name consists of two or more words, you join the words to form a single word and capitalize the first letter of each word, except for the first word.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;The name of the method must not be a Java Keyword, such as int, package, or void. In addition, the method name should not begin with a digit and must not contain embedded spaces or periods. For example, findFile is a valid method name.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;If a method defines a return type, then the return keyword is used to return the value. The keyword is followed by the value that is to be returned by the method. note that this keyword is not required if the method does not return a value because its return type is void.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;Method Arguments &lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;This is a comma separated list of variable declarations that are defined within enclosing parentheses. Arguments are optional. The parentheses are mandatory.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(75,99,32)"&gt;Method Body&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;The body contains statements and expressions that run when the method is invoked. The body of the method can have conditions and loops, and it can send messages to other instances or to other objects.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;span style="font-size:180%;"&gt;Method Overloading&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;"&gt;Programming languages like C require unique names for different methods in the same program. In Java, you can declare methods with the same name. This process is called method overloading.&lt;br /&gt;&lt;br /&gt;In C, a program contains many methods that perform different tasks. Therefore, it is difficult for an application developer to remember the function and name of each method.&lt;br /&gt;&lt;br /&gt;In Java, you can declare methods with the same name. However, these methods must accept different arguments. This process of declaring methods with the same name is called method overloading.&lt;br /&gt;&lt;br /&gt;In Java, every method has a signature, which consists of a method name and an argument list. The data type of the arguments and their sequence helps define the signature of a method.&lt;br /&gt;&lt;br /&gt;A Class cannot have two methods with the same signature. This is because compiler will not be able to determine which method to invoke.&lt;br /&gt;&lt;br /&gt;In addition to overloading a method with a different number of arguments, you can overload a method by specifying different data types for the arguments. You can also overload a method by providing a different sequence for arguments.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre style="COLOR: rgb(75,99,32)"&gt;&lt;table style="WIDTH: 348px; HEIGHT: 112px" cellpadding="7" rules="all" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="WIDTH: 100%"&gt;&lt;span style="font-size:78%;"&gt;void addNum(int num, float num1)&lt;br /&gt;&lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;void addNum(float num, int num1)&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="COLOR: rgb(75,99,32)"&gt;Consider an example in which you declare a method that adds an integer value and a float value. In such situation, a user can pass an integer value first and then the float value or vice-versa. To conform to this requirement, you declare two methods with a different sequence of arguments but with the same name.&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Pass By Value: Primitives&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:85%;color:#4b6320;"&gt;When you invoke a method, you may pass arguments to the method. The arguments are used by the method. Either the value of the argument or a reference to an object are passed.&lt;br /&gt;When you invoke a method by passing arguments by value, it is know as passing by value. When you invoke a method by passing a value to a method, it is known as passing arguments by value. Java passes all method arguments by value for primitive data types. By passing the arguments by value, the original value of arguments is not altered inside the method. The method only receives a copy of the variable.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;table style="WIDTH: 53.22%; HEIGHT: 77px" cellpadding="7" rules="all" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="WIDTH: 100%"&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;void computePrice(int unitPrice, int numberOfUnits) {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;   unitPrice = unitPrice * numberOfUnits;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;   System.out.println("unitPrice in the computePrice method : "&lt;br /&gt;     + unitPrice);&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#4b6320;"&gt;For example, to calculate the total price for four identical items, you multiply the unit price of the item by four. This will not change the price of the individual item. This is because the price was passed by value.&lt;br /&gt;When you invoke a method by passing a value, a local copy of each argument is made in the called method. Consider the code of the item class shown in the above example. This class contains the computePrice method. This method has a piece of code that changes the value of the unitPrice parameter. The computePrice method calculates the price of the number of items and stores the total in the unitPrice variable. The method also displays the total value.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#4b6320;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;In Summary: &lt;/strong&gt;Calling a method and passing the arguments by value does not affect the original value.&lt;/span&gt;&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Pass By Reference: Objects&lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#4b6320;"&gt;Whenever arguments of type Object are passed to a method, their references are passed as opposed to a copy of the object. An object is passed by reference when it is an argument of a method. This ensures that the changes to the object are retained because the actual object is being updated. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#4b6320;"&gt;&lt;table style="WIDTH: 39.01%; HEIGHT: 583px" cellpadding="7" rules="all" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="WIDTH: 100%"&gt;&lt;span style="color:#4b6320;"&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;class Employee {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    String name;&lt;br /&gt;    String department;&lt;br /&gt;    double salary;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public Employee(String empName, String empDept, double empSalary) {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;        this.name = empName;&lt;br /&gt;        this.department = empDept;&lt;br /&gt;        this.salary = empSalary;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    }&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    void printAll() {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;        System.out.println("Name : " + name);&lt;br /&gt;        System.out.println("Department : " + department);&lt;br /&gt;        System.out.println("Salary : " + salary);&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    }&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    public static void main(String args[]) {&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;        Employee jane = new Employee("Jane", "Research", 60000);&lt;br /&gt;        Employee tempEmp = jane;&lt;br /&gt;        tempEmp.name = "Tom";&lt;br /&gt;        jane.printAll();&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;    }&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size:78%;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#4b6320;"&gt;Consider a situation where each employee is assigned three details. These details are name, department, and salary. In addition, an employee can print all the details through the printAll method. The sample code in the example instantiates a new Employee object, bound to the variable jane. The code then assigns Jane to the name, Research to the department, and 60000 to the salary. Next, a variable of type Employee called tempEmp is declared and assigned to the same instance that the variable jane is bound to. Both jane and tempEmp are references pointing to the same object. A change to one will be reflected in the other. &lt;/span&gt;&lt;br style="COLOR: rgb(75,99,32)"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/928005603959840372-5572346613533237002?l=idynsolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idynsolutions.blogspot.com/feeds/5572346613533237002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=928005603959840372&amp;postID=5572346613533237002' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/928005603959840372/posts/default/5572346613533237002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/928005603959840372/posts/default/5572346613533237002'/><link rel='alternate' type='text/html' href='http://idynsolutions.blogspot.com/2006/09/oop-part-1-classes-methods-and-objects.html' title='OOP Part 1 - Classes, Methods and Objects'/><author><name>Editor</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-928005603959840372.post-3482362715161186094</id><published>2006-09-29T13:51:00.000+08:00</published><updated>2006-09-29T13:52:07.321+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IBM'/><category scheme='http://www.blogger.com/atom/ns#' term='Websphere'/><title type='text'>IBM Websphere Application Server 6</title><content type='html'>&lt;p&gt;&lt;span style=";font-family:trebuchet ms;font-size:85%;"  &gt;Every J2EE project has difficulties in choosing the Application Server Containers. Even though open source Application Servers like JBoss tries to rule out the giants, still many commercial projects choose the giants as they have already made good impressions. Among the giants IBM’s Websphere and BEA’s Weblogic had equal competition. Many commercial J2EE projects still believe that their commericial product will be secure only with the giants and the downtime of the giant application servers are negotiable.&lt;br /&gt;&lt;br /&gt;Now IBM has released Websphere Version 6 and recently I attended IBM’s in-house workshop on WAS 6. After attending the workshop, I realized that WAS 6 is going to be the primary Application Server as it provides most of the solutions to the big commercial J2EE projects.&lt;br /&gt;&lt;/span&gt;&lt;em&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;em&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;strong&gt;WebSphere® Application Server V6.0&lt;/strong&gt; is the industry's premier Java™-based application platform, integrating enterprise data and transactions for the dynamic e-business world. Each configuration available delivers a rich application deployment environment with application services that provide enhanced capabilities for transaction management, as well as the security, performance, availability, connectivity, and scalability expected from the WebSphere family of products.&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;strong&gt;&lt;span style="color: rgb(102, 102, 102);font-family:georgia;font-size:130%;"  &gt;What Websphere V6.0 Offers:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. Full J2EE V1.4 compatibility, as well as Web services support above and beyond the specification, including a native, enterprise-ready JMS provider.&lt;br /&gt;&lt;br /&gt;2. New packaging providing full J2EE 1.4 compatibility across the board, from the base Express offering to the most robust Network Deployment, offering multiple deployment options from single server to clustered, highly available, high-volume configurations.&lt;br /&gt;&lt;br /&gt;3. Rapid development and deployment features that reduce development cycle time and maximize the ability to use existing skills and resources.&lt;br /&gt;&lt;br /&gt;4. Tight integration with IBM Rational tools, a highly productive development environment built on Eclipse, the open systems development environment.&lt;br /&gt;&lt;br /&gt;5. Industry’s broadest cross-platform support.&lt;br /&gt;&lt;br /&gt;6. Delivers an advanced, security-rich infrastructure that is extensible through a pluggable architecture.&lt;br /&gt;&lt;br /&gt;7. Delivers a single, unified Web browser-based administration across all configuration options.&lt;br /&gt;&lt;br /&gt;8. Offers distributed-workload and caching capabilities to intelligently optimize performance&lt;br /&gt;&lt;br /&gt;9. Provides enhanced application availability with sophisticated clustering and load-balancing capabilities&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(102, 102, 102);font-family:georgia;font-size:130%;"  &gt;My Observation on Websphere V6.0&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;… WAS 6 has pretty good Administrative Console. Administrative console is built using Struts and JSF technologies.&lt;br /&gt;&lt;br /&gt;Hmm…we all know that Websphere Version 5 also had their Administrative Console built using Struts. So what’s special in Version 6 and why they have also used JSF?&lt;br /&gt;&lt;br /&gt;The Good News to all of us is they have integrated Tivoli Performance monitor in the admin console itself using the JSF technology. Now all our J2EE Projects can be benchmarked easily in the console.&lt;br /&gt;&lt;br /&gt;… They have replaced JMS C Processes with Java Process and embedded the JMS Servers in the Application Servers. In Older versions, once you start your JMS Server you can see list of C Process running in your CPU [Something that starts with ‘amq’].&lt;br /&gt;If you haven’t noticed it yet, try starting JMS Server in Version 5 and look at your Process list [See Task Manager for Windows. Ps –f for Unix].&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;… Load balancing has improved drastically. According to their benchmarks, they claim that Websphere Version 6 can handle 10,000 Concurrent requests where as Websphere version 5 can handle only 500 concurrent requests.&lt;br /&gt;&lt;br /&gt;… They have improved in the areas of Caching&lt;br /&gt;&lt;br /&gt;… Websphere Version 6 has Scheduling Services. This is the one I admire the most. Because when I worked with one of the Reporting Project, the project had a module that involves scheduling architecture. And I had to learn Quartz API and write the scheduler service. Now since this is the part of Websphere, developer’s overhead in writing the services is reduced. And now the developers only need to configure the scheduler service and start using it.&lt;br /&gt;&lt;br /&gt;… Websphere Version 6 has support for Web services.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);font-family:georgia;font-size:130%;"  &gt;&lt;strong&gt;Additional Interesting News:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally in the workshop, IBM mentioned about the following that seems interesting to me…&lt;br /&gt;&lt;br /&gt;… Extended Deployment Server, which is capable of tuning the application server.&lt;br /&gt;&lt;br /&gt;… WebSphere Application Server V6.0 delivers Services Oriented Architecture today, across all configurations. The products allows businesses to increase their return on investment and lower their total cost of ownership by reusing existing IT assets using standards based messaging and the latest Web services standards. This translated into reduced costs, reduced time to value, and increased business flexibility.&lt;br /&gt;&lt;br /&gt;… WebSphere Application Server V6.0 provides a secure, dynamic platform for businesses. Businesses are able to do more work with less resource with WebSphere Application's scaling abilities and security features.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/928005603959840372-3482362715161186094?l=idynsolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://idynsolutions.blogspot.com/feeds/3482362715161186094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=928005603959840372&amp;postID=3482362715161186094' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/928005603959840372/posts/default/3482362715161186094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/928005603959840372/posts/default/3482362715161186094'/><link rel='alternate' type='text/html' href='http://idynsolutions.blogspot.com/2006/09/ibm-websphere-application-server-6.html' title='IBM Websphere Application Server 6'/><author><name>Editor</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>
