Question:
Should I learn C++ or Java first?
Hugs&Kisses
2011-05-05 10:15:05 UTC
I am very interested in computer science. I have taken a class this year and it focused primarily on C#. I want to continue to learn about programing before I go off to college. I am by no means a master of C# but I do want to start leaning C++ or Java. Which one would be better for me? Is there a book you would recommend? I am just worried that I won't have a smooth transition into the CS classes that I may take in college.
Five answers:
?
2011-05-05 10:33:15 UTC
Languages come and go, and no one language is "better" than the next. Sure, a language may be the better tool for a specific software project, but there is no such thing as a "better" language.



Having said that, you should focus your learning efforts on programming methodology, programming paradigms, project management, data structures, and algorithms instead of getting hung up on learning the syntax of as many languages as you can.



There are some things that remain constant from language to language - control structures, sequence, iteration, variables, etc. Likewise, there are some things that are specific to programming paradigms - functions or procedures for structured/procedural programming, and objects or prototypes for object oriented or object-based programming.



I'd say if you understand these methodologies and paradigms, you are more likely to be able to pick up new languages by quickly learning their syntax and API's within a few weeks.



If you're still trying to choose between the two I would say to go for C++. The reason is because it is a multi-paradigm language which means it will give you an understanding of procedural programming style as well as object-oriented programming style. Whereas Java is fully object-oriented.



The guy that says Visual Basic is better should try to wrap his head around the fact that the C# and Visual Basic compilers were written in C++.
anonymous
2011-05-05 10:43:47 UTC
C++ is probably the better language but if you are looking for the best I recommend the low-level C. The reason for this is that C/C++ is the lower level language which give you more freedom to code your program i.e. in a higher level language you have to use the specific functions and the specific framework of that language eg. .net framework for VB and the special API for Java. These frameworks get quite complicated and their is no alternative. They also have quite a lot of bugs which can leave you pulling your hair out trying to find out why your program fails. I programed once in VB and it gave a lot of errors.



With C++ you chose your framework (.net/WIN32/MFC) or in some cases compiler specific frameworks (GNU C++).



I absolutely do not recommend Visual Basic (VB) or Java.



I don't recommend VB because contrary to the other answer it is slow, programs are HUGE (simple hello message box takes up megabytes of disk space) and it has a lot of gimmicks (useless features which slow down your program). Yes it is user-friendly but not functional only very simple programs have been written in it.



I don't recommend Java because it is a very, VERY complicated language. It has a very complicated API which could take you a year to learn. There is no alternative to this API. It requires very special configuration or else it will fail and you will not know what went wrong.



The only reason I can think of as to why your peers will laugh in your face if you spend a long time learning C++ is that it is a very easy language to learn and you should be able to learn it very quickly.



Just a note C#,C,C++ and Java are very similar with only a few differences.
deonejuan
2011-05-05 12:20:52 UTC
Java. Java is still number One in commerce installations, with VB a close second. Why VB? I don't know, but in computer society being first means being able to claim 50% of the market. Java is 27% and VB is 24%.



A lot of professional coding involves maintenance, not first-person blood baths or academic posturing. My view of C# is that it is an academic marvel.



Otherwise, Java revealed to me what Objects are good for and I say that after I had struggled through C++ course. Java helped me to understand C++. I prefer Java.
frodsham
2016-09-27 18:13:39 UTC
Java is greater creation language that C. If you're finding out a programming language, it relatively does not topic. Java used to be developed to be as similar to C/C++ as viable. So if you happen to be trained Java you already understand how to do fundamental matters in each C and C++ (and vice versa if you happen to be trained C or C++ you already understand how to do among the matters in Java). So why Java over C? Java does not relatively require that you simply have an understanding of what's going on below the hood, to put in writing well C code you must absolutely have an understanding of recommendations and reminiscence leadership, in Java that is all sorted for you. Of direction this comes at a fee, Java is much less effective that C or C++, however ONLY for intricate systems, for realistic systems there's no change in potency among C/C++ and Java. Another intent to move with Java is that it's extra standardized that C/C++. Now, there's ANSI C, which I stick to. ANSI C is nearly the ordinary kind of C, all today's compilers comply with ANSI C, however you relatively have got to be certain that you simply use libraries which might be typical to ANSI C, in any other case you hazard wasting portability. Java does not have those disorders...sure you'll import outside libraries in Java too, however regularly you'll simply kit those along with your application so it appears obvious. ALL to be had features/categories/items will also be observed @ the Java API web page. Anything you employ from here's assured to paintings with any variation of the JRE (java runtime atmosphere). The JRE is what permits Java to be transportable. To have an understanding of this calls for a bit of information of the way systems run on a laptop to start with. C systems are transportable via the tip-consumer's compiler. You provide them the supply code, they collect it, then their compiler offers them Machine Code that may be run on their laptop and their laptop ONLY (even though identical machines can frequently run the identical desktop code). On the opposite hand a Java application is compiled at the programmers laptop into Java byte-code. This is what the tip-consumer will emerge as with (the Java byte code)...it is a little little bit of smoke and mirrors on the grounds that truthfully what occurs is that the JRE will convert this Java Byte Code into Machine Code that may be run at the finish-consumer's laptop. So you'll believe of it because the JRE is the typical hyperlink, all JRE's can interpret the identical byte code after which create laptop-distinct desktop code (on the grounds that the JRE is distinct to the tip-consumer's laptop). This simply makes the method of constructing desktop code (that's fundamental to run the application) obvious to the consumer...and in addition explanations inefficiency. Also, Java permits for effortless photos, even though it's going to be a whilst till you're competent to to some thing graphical if you're simply getting began. My backside line is that if you happen to wish to be trained programming then you definately must be trained each, so the truly query is which must you be trained first? I could say Java, be trained how you can write a application, then as soon as you're cozy with that, you'll greater admire the nuances of C. Edit: Java is not strictly a compiled or interpreted language, it is a little of each. It is compiled within the experience that every one systems are compiled into Java byte code, however it is interpreted within the experience that the JRE has to interpret the the byte code to your distinct desktop. I would not relatively recollect Java an interpreted language on the grounds that regularly the one truly advantage to interpreted languages is that you'll make alterations at the fly, you cannot do that in Java with out re-compiling.
benyo73
2011-05-05 10:21:12 UTC
No one uses C++ or Java anymore. Visual Basic is ten times better than both of them combined. Your peers will laugh in your face when they find out you spent so much time learning those useless languages.



But yeah Visual Basic is fast, not clunky, user-friendly, and widely used. You should defiantly spend a lot of time learning it.



EDIT: The guy below should wrap his fat *** around the fact that my answer was clearly sarcastic.

PS: Jew



Oh yeah and for a serious answer, if you plan on taking CS in college, C++ > Java (Not gonna explain why, just do it.)


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...