|
-
Mar 5th, 2003, 04:23 PM
#1
Thread Starter
Addicted Member
what to study: Java or C++
Hi! I have such a situation: I know Visual Basic. But I want to begin to study a new laguage...but I don't know what to choose: Java 2 or C++ ???
So please tell me what to choose and why???
Next regards from Herpysz!
-
Mar 5th, 2003, 04:41 PM
#2
Dazed Member
Go with Java or C#. Don't worry about C++.
Heres some diffrences between C and Java just so you can take a look.
No preprocessor directives: Java treats constant definitions as
static final fields.
No global variables: Java defines an extreamly clean namespace.
Packages contain classes, classes contain methods and fields methods
contain variables. Thus there is no possibility for namespace
collisions.
Well-defined primative type sizes:
All the primative types in Java have well defined sizes. In C, the size
of int, short ,long types is platform dependent, which hampers portability.
Foward References: The Java compiler is smarter then the C compiler in
it allows methods to be invoked before being defined. This elimates the need
to define function in a header file before defining them in a program file, as
is done in C.
No method pointers: C allows the programmer to store the address of a function in a
variable and pass that function pointer to other functions. You cannot do this with
java methods but you can acheive similiar results by passing an object that implements
a particular interface.
Variable declarations anywhere: C only permitts local variable declarations to be at
the beginning of a method or block. Java allows the variable declarations anywhere
within a method or block. --NOTE-- most programmers perfer to keep variable
declarations at the top of a block or method however.
Garabage Collection: The Java Virtual Machine performs "Garabage Collection" or
deallocation of memory automatically. This elimates the need for Java programmers to
explictly manage memory used by all object and arrays. For instance an object is
eligible for garabage collection if there are nolonger any variables that hold a
refrence to that object.
Method overloading: Java programs can define multiple methods with the same name
as long as the methods have diffrent parameter lists.
-
Mar 5th, 2003, 10:17 PM
#3
Addicted Member
i agree with Dilenger4
java also helps you understand the purpose of OOP. you have well defined objects that can interact with eachother. also the GUI components(called awt and javax.swing) are really good and easy to implement. it also helps you understand the model-view-controller setup and how it makes stuff easier.
it also has an awesome api so anything you need to look up for any class, you can do it very easily.
java is a good progression after VB, stronger data typing and a bit more challenging.
--770
-
Mar 6th, 2003, 05:15 AM
#4
Thread Starter
Addicted Member
thanks
thanks guys...i'll begin to study Java..then may be c++.
BUt I have to download first java2se ???
Next regards from Herpysz!
-
Mar 6th, 2003, 11:09 AM
#5
Addicted Member
i'm sure you know this but you have to download the SDK not the JRE 
--770
-
Mar 18th, 2003, 11:32 PM
#6
i may be a little late here. but my advice would be to study both to appreciate the other. without knowing java, you won't be able to appreciate what C++ can do for you. without C++, you won't appreciate how easy java is.
I am a Visual Basic Programmer, who has made a transition to java. I also learned a little bit of C_Sharp on the way.
Cheers!
Abhijit
-
Mar 23rd, 2003, 03:45 AM
#7
Since you're a VB programmer I recommend you learn Java, it is closer to what you were doing previously. But keep yourself open to C++, once you know Java you can learn C++ too.
Dilenger4's post is crap. First, comparing C to Java doesn't make sense. If anything, you should compare C++ to Java. Second, the comparison by syntax changes is pointless. Sure, what is in this post is all true, but the main difference is what the language was written for. Java is for easily distributable cross-platform applications that don't need to worry about speed. C++ is for the biggies, large applications that need the full speed only real compiled languages offer, for small command line tools that don't need any runtimes (esp. in Linux) and finally to create the high-performance backends for higher-level languages like Java, VB, .Net languages etc.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 23rd, 2003, 01:02 PM
#8
Dazed Member
CornedBee the speed of C++ is widely known. Since previous versions of Visual Basic(1-3) were written in assembly and version 4 was written in C++ i think that is a testement to bolth languages. As for the change in syntax i don't see how that would be irrelevant. If i was begining to learn a new language i would certainly want to know what the syntactical differences were from language to language.
Last edited by Dilenger4; Mar 23rd, 2003 at 05:39 PM.
-
Mar 23rd, 2003, 01:07 PM
#9
Yes, if you are learning the language. But when you are only deciding which language to learn then what matters far far more is what the languages are made for.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 23rd, 2003, 01:24 PM
#10
Dazed Member
I will agree with you on that. But if one is made aware of some of the complexities of C++ before comparing C++ to other languages they might opt to choose another language to program in.
Last edited by Dilenger4; Mar 23rd, 2003 at 05:46 PM.
-
Mar 24th, 2003, 12:30 PM
#11
Which would be a pity IMO. That would be scaring them off from C++ because C++ DOES look dangerous and complicated from afar. Once you get to see it closer it all makes sense, until you get very close. When you do that it gets harder again because you have to fight against limitations of the language and individual compilers. C++ allows you so much that you usually end up wanting even more.
Oh how I would love variable length template parameter lists...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 17th, 2003, 02:02 PM
#12
Fanatic Member
I switched careers to programming several years ago and the first language I learned was C++. After 6 courses in that language (finishing with Visual C++), everything else was a comparative BREEZE !!!
Was subsequently able to then learn [and appreciate] VB, Java, Perl, etc.
Do canibals not eat clowns because they taste funny? 
-
Apr 17th, 2003, 03:55 PM
#13
I can't imagine anyone who has a good grip on C++ appreciating VB. Java or C# yeah. Perl too, if you're like that. But not VB...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 19th, 2003, 07:35 AM
#14
Hyperactive Member
CB - The only "thumbs up" I have for vb at this stage is the rate at which applications can be churned out. It was devoloped as a RAD tool and thats exactly what it is. Even with Visual C++ it takes me a lot longer to develop applications. However, they are more stable and run faster, but if a client comes to you and says I want this prog in 3 days, you don't exactly have the time to sit with c++. However, with .net I find it more useful to program in C#. Although I still think the language needs a lot of improvement, I'm pretty sure I'll be coding more in c# than vb in the future.
-
Apr 19th, 2003, 08:18 AM
#15
Yeah, C# solved the worry that I had: that I might one day have to use VB because my boss wants something developed quickly.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 29th, 2003, 07:50 PM
#16
Addicted Member
I learned VB first, when i was young... Then i took on c++ without knowing how difficult it was. I was ok at it but could never finish everything because it is so hard to do everything. Arrays are near impossible; you have to worry about weather or not to send by pointer or not... so on and so forth. Not to mention trying to bring up the simplest window in c++ takes hours of typing :-D.
After all that i switched to java... WOW what a difference. Java is great and i consider it to be the best language of what i know. The only problem with java is its slow speed and inability to make exe's. If you could get Java as a platform specific language then It would be so much better than it already is... Wich is hard to beat!
To protect time is to protect everything...
-
Apr 29th, 2003, 09:16 PM
#17
Stuck in the 80s
Re: what to study: Java or C++
Originally posted by herpysz
Hi! I have such a situation: I know Visual Basic. But I want to begin to study a new laguage...but I don't know what to choose: Java 2 or C++ ???
So please tell me what to choose and why???
You're asking this in a Java forum. What kind of answers do you expect?
-
Apr 30th, 2003, 02:57 AM
#18
He has to ask somewhere 
The C++ forum wouldn't be objective either.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|