Why we need new operator in java at the time of object
declaration and why not in c++?
Answer / anuja joshi
The major difference between Java and C++ is the behavior of object variables. In C++, object variables hold values, not object references. Note that the new operator is never used when constructing objects in C++. You simply supply the construction parameters after the variable name.
Point p(1, 2); /* construct p */
If you do not supply construction parameters, then the object is constructed with the default constructor.
Time now; /* construct now with Time::Time() */
This is very different from Java. In Java, this command would merely create an uninitialized reference. In C++, it constructs an actual object.
| Is This Answer Correct ? | 3 Yes | 0 No |
what is delimiter in sas ?
how many logical drive we can form to physical device in our computer?
What is algorithm in SCD Type2(SAS DI Studio Transformaton)?
what is best way to create a Thread class & why?
why we need to take u?
As per interoperatbility programs written in one language can be used by other language. How can we restrict the features of one language (say C#) in the programmer written in another language (say VB)..for example we have some features like operator overloading which is possible C#.NET (not in VB.NET), how can we restrict that when we are using this code in VB.NET.
Data Structure: How many comparisons are necessary to find the largest and smallest of a set of n distinct elements?
what is the software to run the GSM gate opener program
when will triggars the at new event in abap and web dybn pro?
I want to insert date in the form of yyyy-mm-dd... if any changes happen while inserting date format want to show error meg...any one can solve this..??
how do find the user exit for selected feild whatis the process and can u plz explain it
What is %Type,%Rowtype?