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 |
needs examples for black box testing and white box testing
how to study PHP my own? i reffered many sites.. but as being a fresher i couldnt follow those... which site will be the best one?
What is the difference between DECISION COVERAGE(DC) and MODIFIED CONDITION/DECISION COVERAGE(MCDC)?
what are all the validation we need to perform in data stage?
write a program on c(or)c++(or)java language i.e if i have 5 numbers like (10,24,3,9,15) i want to display highest number from these numbers
what is the difference between SCAN AND CHECK,LOKUP AND XFOOT? where we can use thease opcodes? Can any body tell me real time senariao with example?
what is the difference between rename and label
What do you understand by modular programming?
what are the steps for creating prompt table dynamically for the specified field
Diff.b/w Frames and container?
1 Answers Tech Mahindra, Wipro,
can any method return type may be constructor , or that method name allow
what is the last ant version you worked?how to get it