Old 12-06-2006, 08:22 AM   #1 (permalink)
Olpah's Object
 
marx123's Avatar
 
Join Date: May 2006
Location: inside the big ball lurking for candied apples
Posts: 2,730
Reputation: 10
Send a message via MSN to marx123 Send a message via Yahoo to marx123
Default Is Java and C++....

Is Java and C++ the same

because im studying on a course
im now on the part of Variables...
__________________
ChUunin NinjA oF tHe FoRuM
marx123 is offline  
Old 12-06-2006, 02:04 PM   #2 (permalink)
Cloud's Hair Spray
 
Join Date: Jun 2006
Location: Netherlands
Posts: 61
Reputation: 10
Send a message via MSN to ractoc
Default

No definately not. There's loads of differences between Java and C++. For instance, Java is an OO language, C++ can be used to program OO.

But the biggest difference when it comes to variables would be that C++ has pointers and Java does not. At least not in a way that you can directly manipulate them.
ractoc is offline  
Old 12-06-2006, 11:50 PM   #3 (permalink)
Dante’s Inferno
 
naruto1327's Avatar
 
Join Date: May 2006
Location: OLD PROFILE. NEW: NOODLEPOWA
Posts: 608
Reputation: 10
Send a message via AIM to naruto1327 Send a message via MSN to naruto1327 Send a message via Yahoo to naruto1327
Default

C++ is OO too...
naruto1327 is offline  
Old 12-07-2006, 03:01 AM   #4 (permalink)
Staff Admin
 
lothia's Avatar
 
Join Date: May 2006
Location: Kent Washington
Posts: 5,213
Reputation: 29
Send a message via AIM to lothia Send a message via MSN to lothia Send a message via Skype™ to lothia
Default

hmm if you are talking about the basics, they are almost the same. As in the way you program and think. Pointers are considered beginner as well but we will exclude that. Any ways they are close but not any where near the same, if you can read one you can read the other.
__________________


Moderator since Aug 2004. I am a guy.
Email me at lothia@gmail.com
FFXI Tsukisa: 60pld/30War (retired)
The OnRPG War
lothia is offline  
Old 12-07-2006, 07:32 AM   #5 (permalink)
Olpah's Object
 
marx123's Avatar
 
Join Date: May 2006
Location: inside the big ball lurking for candied apples
Posts: 2,730
Reputation: 10
Send a message via MSN to marx123 Send a message via Yahoo to marx123
Default

Quote:
Originally Posted by lothia View Post
hmm if you are talking about the basics, they are almost the same. As in the way you program and think. Pointers are considered beginner as well but we will exclude that. Any ways they are close but not any where near the same, if you can read one you can read the other.
oh okay

by the what is the use of

include [iostream]

name spacestd;

Class Car


every time i compile that..its says the Class Car is incorrect...
__________________
ChUunin NinjA oF tHe FoRuM
marx123 is offline  
Old 12-08-2006, 03:00 AM   #6 (permalink)
Staff Admin
 
lothia's Avatar
 
Join Date: May 2006
Location: Kent Washington
Posts: 5,213
Reputation: 29
Send a message via AIM to lothia Send a message via MSN to lothia Send a message via Skype™ to lothia
Default

hmm no idea what a Class car is, I havn't done C++ for a while but the include [iostream] if I remember correctly is automaticly adding a premade file which allows you to do the cin, cout etc.
In java you do not require anything like that, but you create everything in classes. How ever variables are the same as far as I have noticed. Not any different ones in either, Arrays are different in how you call them though (but that holds multiple variables)
__________________


Moderator since Aug 2004. I am a guy.
Email me at lothia@gmail.com
FFXI Tsukisa: 60pld/30War (retired)
The OnRPG War
lothia is offline  
Old 12-08-2006, 10:17 PM   #7 (permalink)
Olpah's Object
 
marx123's Avatar
 
Join Date: May 2006
Location: inside the big ball lurking for candied apples
Posts: 2,730
Reputation: 10
Send a message via MSN to marx123 Send a message via Yahoo to marx123
Default

Quote:
Originally Posted by lothia View Post
hmm no idea what a Class car is, I havn't done C++ for a while but the include [iostream] if I remember correctly is automaticly adding a premade file which allows you to do the cin, cout etc.
In java you do not require anything like that, but you create everything in classes. How ever variables are the same as far as I have noticed. Not any different ones in either, Arrays are different in how you call them though (but that holds multiple variables)
i guess...
for variables

is salary a variable?
i talk to my professor about this..he doesnt answer me..i dont know why....
i bet he hates me dunno?

gee lothia..if i have some questions i post a thread here regarding C++

thanks
__________________
ChUunin NinjA oF tHe FoRuM
marx123 is offline  
Old 12-09-2006, 06:40 AM   #8 (permalink)
Staff Admin
 
lothia's Avatar
 
Join Date: May 2006
Location: Kent Washington
Posts: 5,213
Reputation: 29
Send a message via AIM to lothia Send a message via MSN to lothia Send a message via Skype™ to lothia
Default

hmm well you can have a variable called salary.
It would probably be a double. Which would be called by
double salary;
or
double salary = <value>

hmm thats java actually but last time I checked calling them is the same.
__________________


Moderator since Aug 2004. I am a guy.
Email me at lothia@gmail.com
FFXI Tsukisa: 60pld/30War (retired)
The OnRPG War
lothia is offline  
Old 12-28-2006, 01:12 AM   #9 (permalink)
Marios's Mustache Wax
 
Join Date: Aug 2006
Posts: 11
Reputation: 10
Default

Java and C++ same? Nope, they aren't. They are both based upon C but that doesn't make them same. The major differences are that C++ supports Multiple Inheritance and Genericity while Java doesn't and Java supports persistence which C++ doesn't. Java is a pure Object Oriented Language while C++ isn't (it can only be used to program OO, its not pure OOP). C++ has pointers, not Java. And pointers are important, that's what makes C++ programs faster and efficient than Java ones when the size gets bigger. You include header files like #include <iostream> in preprocessor in C++, not Java. In Java, you use something like import java.lang.*;. There's major syntactical difference between the languages too. Java boasts that programs can be made by using shorter codes than C++, and it does require less amount of code than C++. Other than these major differences though, they are much similar. That doesn't mean they are same though, heck, if they were same, Java, (most of the) programs made by which can run easily inside a web browser would have overtaken C++ ages ago.
masterarcher is offline  
Old 12-28-2006, 09:27 PM   #10 (permalink)
McFox Sandwich
 
Join Date: Jul 2006
Posts: 463
Reputation: 10
Default

Java hides some things that C++ doesnt. But you use "using namespace std;" so when you do somthing with iostream like "cout" you just have to put "cout" instead of "std::cout".
Cj Shadows is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:23 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0
OnRPG, Copyright ©2003-2011, Game Entertainment Enterprises