Jump to content

Uncomfortable with terms


newbman

Recommended Posts

Guest mkosca01
Can you tell me the differences between these:object, object classprimitive type, reference typestack, heapThanx!

Well depending on the context I would describe it as this if we have the codeCustomer cust1 = new Customer();cust1 is an instance of the Customer object class. It has all the methods and attributes defined in the customer class available in the program. cust1 is your object and the actual definition of the Customer is the object class.the following link will also lead you to a definition of primitive and reference types.java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html
The Java programming language has two categories of data types — primitive and reference (in the glossary). A variable of primitive type contains a single value of the appropriate size and format for its type: a number, a character, or a boolean value (see the following figure).
The following is some discussion on stack and heap regards Javawww.phptr.com/articles/article.asp?p=31755&seqNum=8&rl=1I found the following quote most useful in understanding the stack and heap
It is useful to know that these two different kinds of memory exist in Java. Stack memory is the program's memory, and heap memory resides outside of the program
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...