Which is the better language to learn, and which is more powerful? My class is doing some gay KPL language so I've decided to learn one of the two on the side, hoping you guys can recommend which one is better. The only experience I have is with Flash ActionScript.
Well, it really depends what you are looking for your application to do. You can really get low-level with C++. I have done a lot of socket programming for some MUD I made a few years back. You can build applications with Java a lot faster because most of the code is already written for you. It is just a matter of finding which library and function you need. You can think of Java as C++ on steroids.
I think it depends on use. you can use both of them in variety of applications. but in low-level applications C++ is more powerful than java. they are very similar in coding. the output of C++ is .exe and it is executable on almost every computer but output of java is .class and every computer which wants to execute it must have Java Virtual Machine. this Virtual Machine makes every computer execute .class file in the same way which programer wants but .exe file may be executed differently in every computer depends on its hardware.
okay, but i heard that to learn java is to learn 90% of C++ and vice versa. are the differences that you mentioned the only ones??
you `re right but only in form of coding. for example see below: if ( x>= 0) { // code here } the code above are same in both programming language. but usage is different. Java is more object oriented than C++. in network programming , experts mostly use J2EE ( java programming for network) and you can use J2ME ( java for micro devices like mobile phones). but C++ has more popularity and is used for simple programming. but it doesn`t mean that you can`t use C++ to write complex programs It means that it is more difficult to use C++ in complexity because C++ is low level programming language.
If you are going to be learning it in your spare time then I would say go with Java which i think is an easier language to learn. If you then want to learn C++ it will not be that big of a jump. Also Java has what can only be described as the greatest learning aide in the business. "Head First Into Java" may be the greatest programming book ever written. Buying this gem should be your first step into learning Java!
C++ for the system application software, for high speed, real time software... Java for network application, database, and run in multiple platform.
I'd go with java. A lot of the concepts will be easily transportable to C++ but for learning on the side I think java would probably be easier.
Either will do well by you if you want a future in programming, but Java is easier to learn on your own. I'd also reccomend "Agile Java: Crafting Code with Test-Driven Development" as a solid book to learn from.
can java accomplish most of the same tasks that C++ does or are their usages completely different..and can java be compiled to .exe form or are the final programs always .class?
No, java cannot accomplish everything C++ can. On the other hand, C++ leaves a lot of resource maintenance stuff for you to handle that java takes care of for you. Why not learn both? Why limit yourself to only one knife in the kitchen, one golf club in your bag, ....?
which language is more popular right now, and which one are north american universities focusing more on at the moment?
C++ is waning in favor of C#. Forget what universities are focused on; they'll teach you what they want you to know anyway. If it's all about universities, focus instead on learning how to program, not the language you program in. To answer your earlier question: The syntax is not quite the same. Java is more readable to the untrained eye and is closer to C# than anything.
i decided to try to learn both...does anyone know of any good books geared to people with not a ton of programming experience??