How would the transitions from Java to C++ be?

Posts 1–15 of 15 · Page 1 of 1
How would the transitions from Java to C++ be?
Basically the title. I just finished a second Java course in college right now (programming fundamentals 2) and I need to take the third part of the course, but it's only in C++. We haven't done anything advanced in Java at all. Worked with single dimension arrays, used getters and setters, objects to call different classes, just simple stuff. I'm starting to learn C++ right now, but I'm worried that I won't do well in the next class since I don't have much history with C++. It probably won't take me long at all to get where I was compared to Java, but if I have two months before the next semester starts, would you expect me to be prepared in time?

Thinking about it, I could probably just do the same assignments as the Java course but write it in C++.

Anyway, any help would be appreciated.
shouldnt be to bad and since you know how to make programs in java do what you want then you should have no issue in your c++ course. the most advanced thing we did in my course(last semester) was just working with linked lists, other than that you can do everything else without a sweat probably. im going into their java course next semester lol so goodluck, was yours difficult at all? currently doing assembly atm
Quote Originally Posted by gogogokitty View Post
im going into their java course next semester lol so goodluck, was yours difficult at all?
Thanks for the insight. Nah, it was extremely easy... I posted all the assignments I had to do on GitHub. https://github.com/Issvor/Programmin...er/Assignments
The most important thing to learn for your Transition is the difference between Pass-By-Reference and Pass-By-Value.

Essentially, if you pass by value, you work on a COPY of the variable;
Likewise, if you pass by reference, you modify the actual variable you pass.
Great example here:
https://stackoverflow.com/a/373455


Java uses pointers, but kind of hides them from the user. In C/C++ you have to do the dirty work yourself. Thats were most people tend to get stuck when they pick up c.

Confused? ThenPlease check out this excellent thread:
https://stackoverflow.com/questions/...-pass-by-value
They're practically the same, the differences are very minor and easy to get the hang of. If you have any specific questions once your course starts you can always post on here and someone here will help you out.
We did nearly the same thing in my school. We moved to C first and then C++. It was kinda tough ngl since Java has so many helpful methods like getting the length of a string, for example. In C, we had to do that manually by counting the number of chars until it reached '/0', the null terminator. Things like that. You should be fine, though. Don't worry about it.
Quote Originally Posted by Amarto View Post
We did nearly the same thing in my school. We moved to C first and then C++. It was kinda tough ngl since Java has so many helpful methods like getting the length of a string, for example. In C, we had to do that manually by counting the number of chars until it reached '/0', the null terminator. Things like that. You should be fine, though. Don't worry about it.
C has built in functions for this as well; strlen
I'm assuming you had to build your own to get acquainted with how C handles strings.
very easy to migrate from java to c++, tlhe syntax is basically the same with a bunch of different keywords used in c++. You should be able to pick it up fairly fast and start solving some problems with it.
I'm in the same situation as you. I'm just taking Programming concepts in c++ after having gone up to Advanced Java concepts and i'm so bored in class. You really shouldn't have any problems at all in c++ besides just learning the syntax and a few minor things.
I started with Java when i was learning to program for the first time several years ago, I went on to study C++ for a few years at uni after that.
I found C++ to defiantly be a step up to Java, however, this didn't really prove a problem. If you did Java to any reasonable level you will be fine going up to C++.
Yes. That should be nice
It is pretty similar, syntax wise. You need to take care of a lot more things in C++ yourself, however.
They're really not that different. In fact sometimes you can copy code right over and it will work you just may have to change a couple of things
Posts 1–15 of 15 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?