473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

What is use of New operator

What is the difference for the objects that are created with and without new operator.I want the exact difference.
Nov 20 '07 #1
3 8330
JosAH
11,448 Expert 8TB
What is the difference for the objects that are created with and without new operator.I want the exact difference.
All objects are created with the new operator. The exception to the rule might
seem deserialization and introspection, but deep down a new operator is used.
Even class objects use a new operator deep down.

kind regards,

Jos
Nov 20 '07 #2
How does objects created with new operator in java is different from objects created with new operator in c++
Nov 21 '07 #3
JosAH
11,448 Expert 8TB
How does objects created with new operator in java is different from objects created with new operator in c++
Not much; in fact: it's the *only* way in Java to create objects. In Java dynamic
objects are created a bit faster than they are in C++. C++ relies on good old
'malloc like' heap management; Java uses something a bit more clever and faster.

kind regards,

Jos
Nov 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

26
by: Steven Bethard | last post by:
I thought it might be useful to put the recent lambda threads into perspective a bit. I was wondering what lambda gets used for in "real" code, so I grepped my Python Lib directory. Here are some...
70
by: Roy Yao | last post by:
Does it mean "(sizeof(int))* (p)" or "sizeof( (int)(*p) )" ? According to my analysis, operator sizeof, (type) and * have the same precedence, and they combine from right to left. Then this...
9
by: John Cho | last post by:
// CHO, JOHN #include<iostream> class fracpri{ int whole; int numer; int denom;
3
by: John Cho | last post by:
/* This program is a database program that will store video tape names, minutes, year released, and price I want it to be professional so that *YOU* will want to buy it and use it for a video...
8
by: dru | last post by:
Every time I think I know or understand C++ with some confidence, I see something that changes that. I was looking at the boost shared_ptr docs and code, and I ran across the operator...
10
by: Steven T. Hatton | last post by:
I read Stroustrup's article of the day: http://www.research.att.com/~bs/C++.html Programming with Exceptions. InformIt.com. April 2001. http://www.research.att.com/~bs/eh_brief.pdf Some of...
17
by: Anoob | last post by:
Can we consider () unary operator when calling a function, in exps eq. f(), ( 1 + 2). But when we call function f( 10 ) it is a binary operator. Even if we pass f( 10, 20) as we are using ,...
2
by: stella_pigeon | last post by:
Can someone offer me a hint how to correctly program the problem outlined below? I have a template class defines as follows class A { int a1; int a2; operator == ... }
16
by: Ajay | last post by:
Hi all, i want to know when i create a class.what all it contains.I know the following things are there by default if i do not declare them by myself.Please tell the other things that are left. ...
2
by: Peng Yu | last post by:
Hi, In the following code, the 'copy' member function works. But the '=' operator does not work. Can somebody let me know why a member function is different from an operator. Thanks, Peng ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.