Wednesday 21 November 2012

OBJECT ORIENTED

OBJECT ORIENTED:-Any technological innovation offer very excellent atmosphere of symbolizes the details in the from of things then that technological innovation is known as as objected technical innovation.
Java provides very excellent atmosphere to to signify the information within the sessions i.e in the item alignment is having it's own wealthy set of functions.
class
object
Encapsulation
Abstraction
Polymorphism
Inheritance
OBJECT AND CLASS:
An object is any factor that really leaves on the globe and can be recognized from others.Every factor that we see actually will come into this meaning, for example, every person, a guide, a shrub, and so on.
          Now, every object has features and displays certain behavior. Let us try to demonstrate this factor by getting an example of a dog. it got features like name, dimension, shade, age, etc. these activity are showed by various methods(function) in our development. In development, various projects are done by techniques only.so we can system that things contain factors and techniques.
        
          A list of object presenting same behavior (properties+actions) will come under the same team known as a category. A category symbolizes a team name given to several things. For example, take the dogs: pinky, nancy, tom and subbu. All these four pets display which contains four things. in others terms , we could described a category as a design or a strategy for developing the things. We make you will of things. so, just like things, a category also contains features and activity , i.e factors and  techniques.

                       CLASS.DOG                                             OBJECT.TOM
                   *    Properties vars                                            * Properties vars
                             name                                                            tom
                             dimension                                                         1 foot
                             shade                                                           brown
                              age                                                            5 years

                     * Action techniques                                          *   Action methods
                          operating                                                           run()
                          woofing                                                          bark()
                          consuming                                                             eat()





                                                        CLASS AND OBJECT

          We can use a category as a design for developing things. To make a category, we can make all you will of things which should adhere to the category. These functions will information us to make the things. A category and its things are almost the same with distinction that a clas. If we count this image with 4 feet, 2 hearing, some duration and dimension. This image in our thoughts is category. If we count this image with the actual factor around us, we can discover tom residing in our home is fulfilling these features. so tom, which actually leaves, is a product and not  a category.

          Let us take another example. plant is category but if we take increased lily, jasmine they are all things of plant category. the category does not quit actually but its things, like increased,lily,jasmine are available physically

SYNTAX FOR CLASS
:
[access-modifier -list] category classname [extends superclass] [implements interface-list]
access-modifier:-
The objective of the accessibility modifiers in coffee is to determine opportunity for the coffee development functions like sessions, techniques and factors.
To determine opportunity we will use the following accessibility modifier:
public, secured, standard, private
From the above record of accessibility modifiers top stage sessions will allow only community and standard one after the other, top stage sessions will not allow secured and personal.

NOTE:
If we have a community category in any coffee information file then we must preserve that coffee information file with community category name otherwise we will get gather time mistake. if we are not having any community category them it is possible to preserve that coffee information file with any name. In this scenario it is suggestable to preserve coffee information file with primary technique category name.
To determine some additional characteristics for the coffee development will use the following modifiers. last,abstract,strictfp,static,native,volatile,synchronized&transient
from the above record of modifiers only last,abstract and strictfp are permitted in top stage category structure.
Class structure will allow morethan one accessibility modifiers from yhe above record. But there should be in vaild mixture.
Ex:-final subjective category a{
}//invaild combination

SYNTAX FOR OBJECT:-
Classname referencevariable=new classname([parameter-list]);
EX:-
Class person{
public fixed voidmain(string[] args){
person p=new person();
}
}
When jvm experience the above training then jvm will provide intimation to the Heapmanager about needing the item.
Jvm will recognize the dimension by the functionality of constructor.
Upon getting an intimation for jvm pile manager will determine a prevent of storage.
While giving a prevent of storage for jvm need HM will determine an exclusive recognition by means of a unique integer value is known as hashcode.
Jvm will get ready another exclusive recognition on the reasons for hashcode i.e Hexa decimal structure of hashcode is known as referrals value, jvm will determine object referrals to a varying known as as referrals varying.
->To get hashcode of the item we will use the following techniques from object category community it hashcode().
->To get referrals of the item we will use following technique from object category group sequence to string()

class FisrtApp{
public fixed viod main(string[] args){
FirstApp fa=new FirstApp();
System. out.println(fa.hashcode());//4072869
System.out.println(fa.tostring());//FirstApp@3e2505
}
}

No comments:

Post a Comment