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 |
I would like to know what is Intellimatch and some interview questions which could be asked related to Intellimatch.
What are the main principles of OOP?
How to use string functions in QTP?give some examples
how to hide prompts
how to generate dsnless connectivity in j2ee
can we convert .class file to dll file
What is a must for multitasking? a) Process preemption b) Paging c) Virtual memory d) None of the above
To sorting array of 10 elements which sorting is best a)selection b)bubble c)tree sort
what is the diffrence between occur 0 and occur 10 in ABAP.
Busy waiting is a method whereas a taskwaits for a given event by continiously checking for an event to occur. What is the main problem with this approach
1.how to deploy the Maven application in weblogic server? 2.In Real time projects all classes are singleton or some classes only singleton explain? 3.what are the major uses of the designpatterns? 4.explain restful &Soap based services explain?
SAS using companies in INDIA
29 Answers Bank Of America, Cap Gemini, Hyundai, IBM, KO, Sristek, TCS, Wipro, WNS,