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 |
Can any one give an example (Source Code) on virtual function implemetation in Java?
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
What does this useful command line do? tasklist /m "mscor*"
can anyone please tell me the procedure for the NIC personal interview as i have been selected for the post of scientist/technical assistant B
ok how would i do the following extract from a file i have ssns = 267907230 which are in column 7 into a separate data set then create a 2nd job step to extract from the data set created the following "fund code" which is in column 31 and is 113 into yet another data set
73. How can you set the status and title for a modal dialog box? a) In the attributes of the corresponding screen. b) Before the corresp. call screen statement. c) In a PBO module of the corresponding screen. d) In the PAI module of the corresponding screen.
What is Partial class and its use?
how will you do destructive read and non destructive read in data queue.....
When we have two versions of the dot net installed how does the compiler know which version of DLL it has to select to an application.
what is the difference between conversion and interface in bdc?
What is the difference between procedure -oriented language and object oriented language?
22 Answers IBM, Infosys, TCS,
Hi guyes, I have cleared 2 technical rounds with cts for liferay and java techonologies, i have client round next week, please tell me how to prepare for this what questions i should be ready to face?