C++ Vs Java

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2007
Posts: 266
Reputation: quintoncoert is an unknown quantity at this point 
Solved Threads: 3
quintoncoert quintoncoert is offline Offline
Posting Whiz in Training

Re: C++ Vs Java

 
0
  #11
Jul 10th, 2007
Originally Posted by Narue View Post
>If I were to make a career out of computer programming,
>which would be better to learn, Java or C/C++?
If you don't know C, I wouldn't hire you. Period. If you don't know Java or C++, whether I would hire you or not depends on the job. However, I would recommend learning all three, starting with C, then moving to C++, and finally Java.
@ narue unless of course someone else knows exactly what she means.

Why? i know java and am learning c# and c++. but what is the point of C? what is so special about it that someone cant just learn c++ and use it for situations that also calls for C? are there really some programs that is best written in C? i have always been under the impression that games are the most difficult thing for a human to write as well as the most demanding thing for a computer to execute. so if games are written in C++ then what is the point of learning C?
Last edited by quintoncoert; Jul 10th, 2007 at 11:04 am.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 82
Reputation: hinduengg is an unknown quantity at this point 
Solved Threads: 3
hinduengg's Avatar
hinduengg hinduengg is offline Offline
Junior Poster in Training

Re: C++ Vs Java

 
0
  #12
Jul 10th, 2007
You may opt for Java because its a new language that is yet to be developed instead of C or C++ . The latter have become full fledged,vast. There are thousands of sites which use java applets. Java is currently very popular , much more than the others.

For me Java was really easy to learn than C++. It had so nice sorting techniques , so lucid for anyone in my small view.
Learning C++ is easy with Daniweb :)
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 102
Reputation: TheGathering is an unknown quantity at this point 
Solved Threads: 10
TheGathering's Avatar
TheGathering TheGathering is offline Offline
Junior Poster

Re: C++ Vs Java

 
0
  #13
Jul 10th, 2007
Originally Posted by quintoncoert View Post
@ narue unless of course someone else knows exactly what she means.

Why? i know java and am learning c# and c++. but what is the point of C? what is so special about it that someone cant just learn c++ and use it for situations that also calls for C? are there really some programs that is best written in C? i have always been under the impression that games are the most difficult thing for a human to write as well as the most demanding thing for a computer to execute. so if games are written in C++ then what is the point of learning C?
As I posted earlier, C is used both as a metalanguage ( a language for creating other languages) and as a language for many hardware oriented software applications/drivers.

Learning C teaches responsibility in coding as it can be considerably more hazardous to your computer if you write shoddy code. While C++ may be safer and easier to use for application development, C is still the more powerful tool for many applications.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 266
Reputation: quintoncoert is an unknown quantity at this point 
Solved Threads: 3
quintoncoert quintoncoert is offline Offline
Posting Whiz in Training

Re: C++ Vs Java

 
0
  #14
Jul 10th, 2007
@ thegathering or narue or anyone else who knows.

i have gone on the internet and have seen that C is used primarily for system programing since it can access hardware addresses directly. i am a bit confused between what it can do and what c++ can do with memory addresses.

i know that a pointer in C++ can alter the value of a variable and how it does this. i assume that c also has that ability. but what i dont know is if C++ can directly access a memory location if that memory location is not assigned to a variable. i suppose that C can. in the light of that am i correct to assume that C can do things such as send a group of bites to lets say a printer port or a graphics card but that C++ cannot do that directly? (i.e. the only way c++ can do that is via a library written in C)

i originally thought that C was an outdated language and that C++ can do everything that it can do plus it can do object oriented as well. i just thought that learning C would be a waste of time since C++ includes C functionality as well. but that still does not explain why she would not hire someone who dont know C?
Last edited by quintoncoert; Jul 10th, 2007 at 11:59 am.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,730
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 737
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: C++ Vs Java

 
0
  #15
Jul 10th, 2007
>there are deffinate uses for both C and C++ but it is
>not necesarily true that one should learn C prior to C++
Where did that come from? I wasn't talking about which one to learn first, I was talking about your magic comparison of two different languages that somehow makes sense to you but not in reality. Of course you would have to be careful not to mix in C styles when working with C++, just as you would have to be careful not to mix C styles when working with Java. That's what I was talking about.

>what is so special about it that someone cant just learn
>c++ and use it for situations that also calls for C?
C is available on more platforms than C++, so if you work on one of them you have no choice. There's more C code than C++ code out there, and you can expect to be asked to work with some of it. C is considered the base language that every programmer should know. C++, Java, C#, Perl, and the majority of the mainstream languages are based off of C. If you know C, you have insight into why those languages are the way they are. And most importantly, programming culture has grown to expect you to recognize and read C to some extent. It's much like the pseudo code used in technical papers. You're simply expected to know it, and if you don't, you're only hurting yourself.

>am i correct to assume that C can do things such as send a group of
>bites to lets say a printer port or a graphics card but that C++ cannot
>do that directly?
No, C++ can work at the same low level as C.

>i originally thought that C was an outdated language
Just because it's old doesn't mean it's outdated.

>and that C++ can do everything that it can do plus it can do object oriented as well
Keep in mind that object oriented programming doesn't have to be supported directly by language features. Most of the guidelines in OOP can be followed in C with minimal effort. The rest can be simulated.

>i just thought that learning C would be a waste of
>time since C++ includes C functionality as well.
Learning a new language is never a waste of time.

>but that still does not explain why she would not hire someone who dont know C?
That's simple. If someone doesn't know C, that's a good indication that he lacks the experience, drive, and foresight that I look for in exceptional programmers. If someone doesn't know C, the only way he can claim to have worked low level enough to do the jobs I hire for is to know assembly. If he knows assembly but not C, that's a huge red flag because it suggests he's either quite the beginner, or he's too dogmatic about assembly to be of any real use as a professional developer.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 489
Reputation: Bench has a spectacular aura about Bench has a spectacular aura about Bench has a spectacular aura about 
Solved Threads: 49
Bench's Avatar
Bench Bench is offline Offline
Posting Pro in Training

Re: C++ Vs Java

 
0
  #16
Jul 10th, 2007
Originally Posted by quintoncoert View Post
@ narue unless of course someone else knows exactly what she means.
I expect the reason is that C is still the most widely used general purpose programming language. It doesn't really matter what features are available in C++/Java/etc when an existing system is written in C - many jobs will likely involve maintaining or updating legacy code rather than starting out entirely from scratch - something which you can't do unless you're familiar with the language its written in.
¿umop apisdn upside down?
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1
Reputation: AbyBaby is an unknown quantity at this point 
Solved Threads: 0
AbyBaby AbyBaby is offline Offline
Newbie Poster

Re: C++ Vs Java

 
0
  #17
Jul 18th, 2007
I blv Java and C++ both have a place of their own and it is better to learn both.

Probably coding in Java for application programming is better in the long run. This is specially true because of the fact that Java is converging in terms of performance with C++ with every successive release. Besides you escape from memory leaks and crashes caused by faulty C++ code.

In product development many a times you will find that part of the code is in C++ while part of it is in Java. So if you want to be at the core of things you need to know both.

For me, it is like, I need to know C++ because I need to know the product by knowing legacy code. I need to know Java because I love coding in Java.

AbyBaby
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 143
Reputation: venomlash is an unknown quantity at this point 
Solved Threads: 2
venomlash's Avatar
venomlash venomlash is offline Offline
Junior Poster

Re: C++ Vs Java

 
0
  #18
Jul 18th, 2007
Try C# sometime. I hear it's halfway between JAVA and C++, so that might be useful. Personally, I'd say C++ is easier to work with; strings are mutable, you just have to type cout instead of System.out.print, and many other little things that make coding easier. Of course, I know very little about coding, so hey...
Beware of the Rancor. I'm not kidding.
If it doesn't compile, try saying "By the power of MegaMan!!!" <this has kinda worked for me, actually...>
Scotland is NOT North Britain, Glasgow does NOT rhyme with "cow", and Robbie Burns is...well, if you don't already know who he was, you're kinda screwed.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: C++ Vs Java

 
0
  #19
Jul 19th, 2007
Originally Posted by Killer_Typo View Post
java compilers and the java runtime environment are created using C++
Possibly, but not necessarilly.
You can just as well write a JVM in say Fortran or Assembly.
Or create one in hardware.
Anyway, the language a compiler or operating system is written in is no indication that you should know that language first before you can master the language that compiler compiles.

learning both C and C++ is good but you may find yourself trying to unteach yourself things from C when you work in C++.
And the reverse is equally true (though enforced by the compiler).
If you're good enough you recognise the different paradigms and don't mix them without very good cause.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 759
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Solved Threads: 35
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

Re: C++ Vs Java

 
0
  #20
Jul 19th, 2007
Originally Posted by jwenting View Post
Possibly, but not necessarilly.
You can just as well write a JVM in say Fortran or Assembly.
Or create one in hardware.
Anyway, the language a compiler or operating system is written in is no indication that you should know that language first before you can master the language that compiler compiles.
I am pretty sure they are. If you go to java's website and grab the SDK's and tool kits they all come packed as C++
Dont forget to spread the reputation to those that deserve!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC