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 the best action a system can take when deadlock is detected
What is the language used for Artificial Intelligence?
Hi can you please help for the following. I have a ASP.Net web page I want to print the whole page how is it possible? I want It in ASP also.Please send me the solutions dipankar.hazari@gmail.com . Thanks in advance.
What is the Super Class of Exception in java?
11 Answers Andesa Services, Benchmark, CitiGroup, CMC, Evergent, KOT Systems, Value Labs, Vijay infoart Solutions,
What is nocopy in plsql?
Can anyone send me NIC question papers alongwith answers on nidhi1485@yahoo.co.in? Urgently needed.. Thanks in advance
if there are n nodes in a binary tree, how many null pointers are there?
Which tag is used to break a line
how to avoid java script validation in client side validation?
About CLR, reflection and assemblies?
Is there any standard procedure to test the application as a whole? Or How can I test complete application right from the requirement gathering?
What is %Type,%Rowtype?