Java
  Home arrow Java arrow Page 3 - Java Part 1: The Basics
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Java Part 1: The Basics
By: Chris Noack
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2001-11-20

    Table of Contents:
  • Java Part 1: The Basics
  • The whats, hows and cans
  • What are objects?
  • One Name: Many Uses
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Java Part 1: The Basics - What are objects?


    (Page 3 of 5 )

    Objects in Java and other object-orientated languages contain both data members and the methods (functions) that operate on those members.

    Because of this, encapsulation is achieved and objects will function more reliably with other independent code. Objects are simply instances of classes. Methods and members that are contained within an object are accessible with the dot (.) operator, such as myObject.DoWork(). We will explore objects later in the series.

    Why code twice when once will do?

    The answer?... Don't! As well as any user defined classes that one may wish to implement, Java comes with a great many predefined classes so one need not re-invent the wheel every time new code is needed. This can greatly expedite the coding and design process.

    In Java, classes can be extended from existing classes. The descendant class extends its parent class by inheriting its attributes and defining extra ones. This is called inheritance. Inheritance is useful when a class is very similar to another class, but needs additional methods or members. Inheritance saves a lot of code duplication.

    Another example of a form of inheritance is class abstraction. Abstract classes and their descendents make use of the same methods, although the methods for each descendent class will perform different actions specific to the nature of the class. This is a powerful feature of the object-orientated paradigm that will also be explored in more detail later down the track.

    More Java Articles
    More By Chris Noack


     

    JAVA ARTICLES

    - Deploying Multiple Java Applets as One
    - Deploying Java Applets
    - Understanding Deployment Frameworks
    - Database Programming in Java Using JDBC
    - Extension Interfaces and SAX
    - Entities, Handlers and SAX
    - Advanced SAX
    - Conversions and Java Print Streams
    - Formatters and Java Print Streams
    - Java Print Streams
    - Wildcards, Arrays, and Generics in Java
    - Wildcards and Generic Methods in Java
    - Finishing the Project: Java Web Development ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek