Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Classes and Objects

                         

Objects and classes are the fundamental parts of object-orientated programming technique. A class can contains both data as well as methods. A simple class having no method must contain a method known as main() method. Execution of any class starts from the main() method. 

A class can have more than one instances (objects), let us consider a class employee having the employee details that serves for the employees of an organization, each time we create a new object for each employee. While all the employees share the same template (i.e. employee class).

This section illustrates how to define our own classes, that includes declaring and defining of member variables, methods, and constructors. We also try to cover nesting of classes within other classes, enum and annotations.
  1. Classes:
    This section explores the concept of a class in reference to object oriented programming techniques. A class defines the properties of  objects and methods used to control an object's behavior. In terms of object-oriented programming, the class is like a template from which an instance (object) of a class is created at run time.
                                                                     
  2. Objects:
    A
    n object is the combination of related states and behavior in which variables are just like states and the methods are just like behaviors (providing some functionality). In an object, variables store values for later use and methods are the unit of codes that provides a particular functionality. We can say objects are the basic units of the object-oriented programming. 
                                        

  3. Nested Classes:
    One more advantage of Java, as an object-oriented programming language is that it allows us to define a class within another class, such classes are known as nested classes.
                                                                         
  4. Enum Types: 
    Enum is a keyword which was introduced in Java 5. It is a particular type of class whose instances are only those objects which are members of that enum. The super class of all enum objects is java.lang.Enum, apart from this enum can not be extended.
                                                                      
  5. Annotations:
    Annotation is one more powerful feature of Java, an object-oriented programming language included in JDK 1.5. Annotations were introduced in September 2004  and added to the Java language through specification.

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Latest Searches:
java code for displayi
Xcarecrows 4 XML
Sort the TreeMap by it
usingRTPwithMidlets
mtab comany
Linux Caixa MаÑ??аÑ?
strutsvalidationforhid
Display image on JSP p
bean returning result
retriving multiple ima
Photoshop Photo Effect
file upload in structs
Lightwave3DModellingEa
chartinservlet
sequence number genara
what is interface in j
count column tabl
convertstringtostingof
Tutorial:FlashBasicPas
field validators
cd change directory in
textboxinjspusingajax
PhotoshopBasicsStained
round of number
jsp bean get property
in photoshop how to ma
how to call pl/sql fro
clear the screen in ja
open file with optionp
java4features
columnwidthPOI
java charts
JText Area
read integers from fil
how%20to%20send%20emai
modify
netbeans jsp
login jsp
hibernatefind(object)
stringbuffertoxmlobjec
PHP Email Systems Send
read space character f
openGL
substring(int,int)
jQuery To Hide the Div
class file stored
architecture of a serv
jsf tree node set hr
request.getParameterVa
swing
documentwrite
sending SMS in JAVA
grantchart
Reading File into Byte
click on radio button
jar file
exportdatabasedatainto
Photoshop Wave effect
highlighting and dehig
MurachÐ?????Ð????Ð???Ð
linking codes in java
jsf chat tomcat eclips
Photoshop Effects Hole
shellscriptsusingunixc
passing values from js
Quick Sort
userdefinedexceptionsa
JFileChoosershowOpenDi
network
programinjavatodrawrec
struts pdf file free d
j2me stringItem
Flash Dynamic Content
Combattons
input in java
Agents() in Ms-excel
java bean insert conne
logic iterate
populate drop down fro
Array in Java
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.