Why is java easier to debug than C++?

B

b83503104

I heard that Java is easier to debug than C++. Is it because of the
tools, or because of the language?
If it is the tools, can anyone pls tell me what tools are commonly
used for debuging?
Thanks
 
R

Roedy Green

I heard that Java is easier to debug than C++. Is it because of the
tools, or because of the language?

It is easier mainly because Java cannot go as far off the rails before
failing. For example:

1. subscript out of bounds always throws an exception, rather than
fishing/storing erroneous data out past the end of the array.

2. uninitialised variables are caught at compile time.

3. pointers CAN'T point at anything but the object type they claim to.
In C they can point absolutely anywhere.
 
P

perry

java does not need to be natively compiled for it to be tested, these
and many many more advantages not the least of which are based on
lessons learned from C++....

does this come as a surprise to you ?

- perry
 
L

Liz

I use 'printf' for c and 'println' for java.

perry said:
java does not need to be natively compiled for it to be tested, these
and many many more advantages not the least of which are based on
lessons learned from C++....

does this come as a surprise to you ?

- perry
 
C

Charles Fox

Less mucking around with pointers,
Arrays are proper objects,
Nice exception handling,
Friendly API docs
 
K

KC Wong

Friendly API docs

Wholeheartedly agree... I hate the way MSDN structures their information.
And their search function don't work at all... returning too much irrelevant
results.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top