Why we need new operator in java at the time of object
declaration and why not in c++?
Answer Posted / 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 |
Post New Answer View All Answers
In an customer exit (include Z) program, only the last record is getting fetched. The exit is getting called after pressing save button. What to write for fetching the first record ? Before saved to a SAP table how can i call all these records in an itab in the exit ?
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again
In project we have Documentation phase also,in that what is micro and macro designing?
what is the last ant version you worked?how to get it
what are the missinschema properties and should we pass primary key in select command
when we use mantis? how learn mantis?
what are the differences between CONS, LIST, and APPEND
i am getting the error while compiling my cics program with including db2 dclgen member it is showing that ur dclgen member not including and all the host variables are undeclared
what is the system development cycle
how to add Servlet-api.jar file into eclipse 3.3.2 ?
what is meant by life cycle of a business
write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe
Any real time example of O2C process from taking order till creating invoice.
Q2. A memory location has physical address D5687h. Compute: a. The offset address if the segment number is D445h. b. The segment number if the offset address is B577h.