B
BillJosephson
Want to do OOP. Does c++ have all the abilities of java, or is it some
subset?
Thanks...
subset?
Thanks...
BillJosephson said:Want to do OOP. Does c++ have all the abilities of java, or is it some
subset?
Want to do OOP. Does c++ have all the abilities of java, or is it some
subset?
Thanks...
Want to do OOP. Does c++ have all the abilities of java, or is it some
subset?
BillJosephson said:Want to do OOP. Does c++ have all the abilities of java, or is it some
subset?
kwikius said:Yes C++ is basically just a clone of some of the simpler to understand
Java features.
That really limits its usefulness but makes C++ very easy to learn.
Most people can pick it up in a couple of days.
regards
Andy Little
Rolf said:Java has features that C++ doesn't have, and C++ has features that Java
doesn't have. If any, I'd call Java the subset, because quite some features
have been removed to make the language simpler.
Sylvester said:Was this pure sarcasm or have you mistakenly swapped the words "C++" and
"Java"?
Erik said:Well, I don't know of any comparison but personally I'd say that C++ is
a superset of Java, way more powerful. Truth is that I don't think that
there is much that, from an application level programmers point of
view, you can do in C++ that you can't do in Java or the other way
around (if we are just looking at the language and not bringing
libraries in). They are different languages with different abilities
which leads to different solutions, but I think you can solve all
(most) problems with any of them. The question is just how.
Personally I feel a bit confined when using Java, I often come across
situations where I know I could have solved a problem really easy and
elegantly with C++ but Java does not support that kind of programming,
maybe it's just because my way of thinking is closer to the C++ way
that the Java way, but I've always felt more in control with C++. Just
look at a parameter to a function, in Java an object is passed by
reference and a built-in type (int, double etc.) are passed by value.
In C++ I can choose if I want to pass any parameter by value, reference
or pointer.
If you want to learn OOP by all means try C++. It might be a bit harder
than Java at first, there are lots of rules and things to keep in mind
but the basics are quite easy and the rest comes with experience, and
if there is anything you are wondering about you can always ask your
question here or in comp.lang.learn.c-c++.
And you might want to read the excellent FAQ:
www.parashift.com/c++-faq-lite/
BillJosephson said:Want to do OOP. Does c++ have all the abilities of java, or is it some
subset?
Thanks...
Sascha said:multiple inheritance for example
BillJosephson said:Thanks much for the responses.
Hm, I'm surprised by this, given what other people have told me.
Bruintje said:Java is is a copy of c++. C++ has more features is faster. There is nothing
new in java you cannot do in C++.
Java sucks
John
bjeremy said:Bruintje Beer wrote:
jeremy said:C++ "had" more feature, Java 1.5 added a lot... i.e. Gereics which are
their version of templates...
Josh said:I hope you're not seriously trying to claim that generics are
templates. All generics are is a wrapper around down-casts and up-casts
from generic Object types.
bjeremy said:No, I'm seriously trying to imply that they try and give you the same
functionaity of generic programming, not on how differently the two
language features are implemented.
Josh said:Except that you can't actually use generics. You can use Objects, and
cast them to and fro as generic parameters, but god forbid you actually
try to store a generic.
BillJosephson said:Aside from the differences in parameter passing Erik mentioned, what
can C++ do that java is lacking?
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.