• Forum
  • Lounge
  • How close is java and objective C to c++

 
 
How close is java and objective C to c++

closed account (EwCjE3v7)
I've got I long way to go but after learning most (like u know what I mean) I would like to go to java or maybe objective c for ios apps
I we wondering how close is java and objective c?
I've programmed a little of java and know the int double and them but that was some time ago and was wondering how close are they.
I've programmed a little of java and know the int double and them

So, you know how to use two data types that are represented in virtually every language? You have now mastered Java.

how close are they

How close are Java and Obj C to each other? I've heard they're pretty similar, but I've never touched Obj C.

How close are they to C++? As close as any other general-purpose OO language I guess. Which is, not much.
closed account (oGwfSL3A)
Obj-C is just Apple's different approach to making an OO version of C. It doesn't have some of the features that C++ does, though, like templates. It shouldn't be that hard to use Obj-C, but you'll, almost definitely, have to look at a tutorial on some, but you'll be familiar with a lot.

I know almost nothing about Java, so...
As far as syntax goes, the languages are all extremely similar.

As far as the way you think to effectively program in the languages, they are all extremely different and even contradictory to each other.
I don't think that Obj-C syntax is similar to C++. In certain parts, I guess, but it stands out pretty instantly.

If you compared a C++/Java snippet, you'd have to look a little closer at the syntax to see which is which. Obj-C is pretty obvious from the off.
closed account (Dy7SLyTq)
well obj-c and c++ are both based off c, so they do have a lot of things in common. some of the different things though are the commands in obj-c for automatic memory management and how you handle string literals (oh and the fact that you can only have a pointer to a class)
Last edited on
I think you meant "are both based off C".
closed account (Dy7SLyTq)
yes sorry i meant c. ill fix that
closed account (EwCjE3v7)
Thanks guys. I wasn't on so had to read all now. Thanks.

So, you know how to use two data types that are represented in virtually every language? You have now mastered Java.


I meant I only learnt a little like input and output and that so can you tell me how close they are to c++


Thanks
As far as input and output go, it will seem very different at first, but if you stand back and look at the big picture you'll see that they all use streams.
As far as syntax goes, the languages are all extremely similar.

ObjC syntax (the OO part) is not really similar to Java or C++. I read it takes after smalltalk.
Topic archived. No new replies allowed.