The main difference between C++ and JAVA or C# is that C++ has pointers and Java or C# doesn't
in C++
Student bill;
bill = new Student();
bill.GPA = 4.0;
in Java
Student* bill;
bill = new Student;
bill->GPA = 4.0;
Note That
Yes, they are called "reference types". The references point to objects.
You mean that you cannot have objects as values, then yes.
simple data type called Yes, they are called primitive types.
Basically. There is no way to "take the address" of a variable. But you can copy the value of the variable into a field of a wrapper object, which then can be pointed to by a reference.
Thursday, November 19, 2009
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment