newbman Posted March 31, 2006 Share Posted March 31, 2006 Can you tell me the differences between these:object, object classprimitive type, reference typestack, heapThanx! Link to comment Share on other sites More sharing options...
Guest mkosca01 Posted April 6, 2006 Share Posted April 6, 2006 Can you tell me the differences between these:object, object classprimitive type, reference typestack, heapThanx!<{POST_SNAPBACK}> 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.htmlThe 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 heapIt 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now