internet technology Describe the difference b/w variable holding primitive value as compared with object reference through program The main difference is that primitive variables hold values, while object variables hold references to values. You can think of an object variable has holding the location of the value, rather than the value itself. This is somewhat similar to the concept of pointers in C and C++. However, it's somewhat more abstract in Java, since you can't actually directly read or manipulate the memory location in an object reference (and, in fact, it may not always be the same). In java, we have the primitives such as int, double, boolean, short, long.... These parts of the language are lengths of bytes. They can only hold a value. But also we have API types such as Integer, Double, Boolean, Short, Long... (note the caps). Objects have: states, values, and behaviors. One 'thing' holds a collection of different types information. The Object ty...
PhD || Artificial Intelligence, Machine Learning, Soft Computing, Quantum Machine Learning, Data Sciences.