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
how do u handle table control inbdc explain the process in steps iwant the answer in urgent please forward this even i know how to explain there
Is class is a abstract datatype in java?
public static void main(String args[]) describe it
how can we implement locks in plsql?
WHAT IS THE MEANING OF CONSTANT ...EXEEDS LENGTH LIMIT WHILE COPYING FROM PS FILE TO KSDS
purpose of abstraction and interface
If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this
what is radio button? Plz show code this! how will select radio buttons to go next window Forms? Supose o radio button1 o radio button2 o radio button3 o radio button4 how will coding this? Plz explain this!
can any one suggestion me present which course(except java,.net) has huge demand in the market?
I want Ada programming language books. Could anyone post me any link for that?
what are all the validation we need to perform in data stage?
how to convert the data from HTML file to SAS dataset?
the systematic access of small computers in a distributed data processing system is referred as?
Given an array of size n, containing every element from 1 to n+1, except one. Find the missing element.
< DL Compact > tag is used for