Results 1 to 2 of 2
  1. #1
    rru96 is offline Senior Member
    Join Date
    Sep 2012
    Posts
    108
    Rep Power
    0

    Default Create objects. What happens to objects on close

    So I have been trying to learn Java using some online resources. I am hung up on creating arrays of objects. I have some sample code so that is not why I am here. I am trying to put the pieces together and wondered, what happens to an object when I close my IDE. I am still trying to wrap my brain around everything so I appologize if this seems like a stupid question.

    The reason I ask is I was trying to make a simple banking program. Letting someone Add, Delete, or Modify account. After coming to the Add Account point, I started to try and learn to write to a .txt file as that seemed like the logical way to store data like Name, Numbers, etc. But then I was confused as to exactly how this all worked for Objects since it doesn't have a .txt file associated to it. For instance if I were to make an Account[].

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,679
    Blog Entries
    7
    Rep Power
    21

    Default Re: Create objects. What happens to objects on close

    Objects are just sequences of bits and bytes in RAM memory; an object is just a concept in our minds, i.e. the way we think about those sequences of bits and bytes. a C programmer would think in terms of 'structs', a Pascal programmer would think about 'records' etc. When you kill your IDE or turn off your computer those bits are gone, lost for the posterity. Java does know about 'serialization' of objects where those bits are written to persistent memory (e.g. a disk) such that the objects can be reconstructed later.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. how to auto create objects
    By Sling-it in forum Android
    Replies: 7
    Last Post: 01-08-2013, 12:42 PM
  2. Replies: 12
    Last Post: 04-29-2012, 03:55 PM
  3. create new Objects with for loop
    By nome in forum New To Java
    Replies: 4
    Last Post: 02-28-2012, 03:26 AM
  4. How to create an array of objects
    By redmaverick in forum New To Java
    Replies: 7
    Last Post: 10-19-2009, 03:14 AM
  5. Replies: 1
    Last Post: 01-22-2009, 05:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •