programming fundamentals


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: programming fundamentals

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    1

    Exclamation programming fundamentals

    Can anyone tell me what INSTANTIATE means in a java program, with a possible Example.

    ty

    gail

  2. #2
    Join Date
    Mar 2006
    Posts
    35
    Here's another forum somebody already explained it in always check google first here's the link http://forums.dreamincode.net/showtopic13782.htm

  3. #3
    Join Date
    Dec 2005
    Location
    Arrr
    Posts
    32
    Insantiate means 'to create an instance of'. In object oriented programming, objects are defined by classes, a class being a 'blueprint' of an object.

    For example, think about chocolate chip cookies. You make them by following a recipe. The recipe defines what it is to 'be' a chocolate chip cookie. You can't use it to make oatmeal cookies or peanutbutter cookies, only chocolate chip cookies, because chocolate chip cookies have attributes that are unique to their type.

    Instantiating a chocolate chip cookie means to create a single cookie by using the recipe (class). So, if I created a class called 'CCCookie', I would instantiate a 'CCCookie' with code like this:

    CCCookie myCookie = new CCCookie();

    I could make another one:

    CCCookie yourCookie = new CCCookie();

    I have now instantiated two of them...but they are totally independent of each other. If I were to execute the code
    myCookie.eat();

    It would not affect yourCookie in any way, because they are separate instances of the CCCookie class.

    Hope this helps.

Similar Threads

  1. initial Java programming
    By Kallahan in forum Java
    Replies: 1
    Last Post: 01-20-2003, 08:28 AM
  2. Outsource your Java & C++ programming to Novosoft!
    By Novosoft in forum web.announcements
    Replies: 0
    Last Post: 02-14-2001, 03:50 AM
  3. Replies: 1
    Last Post: 04-10-2000, 12:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center