Author |
Message |
matt271

|
Posted: Mon Apr 06, 2009 2:02 pm Post subject: java and c++ |
|
|
hi alls
i am new to OO programming as i just started comp sci this year
i like java cuz its easy, but i want to learn c/c++
one thing i would like to do is write a class in c++ and load it in java and call methods in the c++ class from java
is this possible? can somebody point me in the right direction?
ty |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
rdrake

|
Posted: Mon Apr 06, 2009 2:18 pm Post subject: RE:java and c++ |
|
|
Why yes, yes it is. Check out the Java Native Interface.
Best of luck to you. |
|
|
|
|
 |
DemonWasp
|
Posted: Mon Apr 06, 2009 2:37 pm Post subject: RE:java and c++ |
|
|
It's possible - JNI, as rdrake said.
The better question is why you would want to do that. There are some use-cases where you literally cannot do something in Java and therefore have to do it in another language (frequently C/C++), but those are pretty rare. You've got me curious now. |
|
|
|
|
 |
Sniper4Life

|
Posted: Mon Apr 06, 2009 9:02 pm Post subject: RE:java and c++ |
|
|
hiya
id like to ask a couple of questions too
im an 8th and has taken an interest in computer science
of course i cant really get classes and things yet (starting a class in september tho )...so i was wondering well...where should i start?
what should i start off with in computer sciences?
like ive looked at alot of stuff and i think id like to do software engineering...and now im wondering...WHAT DO I NOW?
like im a super begginer...13 year old... |
|
|
|
|
 |
DemonWasp
|
Posted: Mon Apr 06, 2009 11:15 pm Post subject: RE:java and c++ |
|
|
You should probably start with Turing. The download is free, the help is bundled, the error messages are friendly, and there's a community here to help you. Specifically, follow The Turing Tutorial.
Moving from Turing to Java is pretty easy (from personal experience). C++ is an unmitigated horrorshow to for learners, so you should probably stay away from that. |
|
|
|
|
 |
wtd
|
Posted: Mon Apr 06, 2009 11:50 pm Post subject: RE:java and c++ |
|
|
With all due respect to those who've learned Turing in school... why would anyone in their right mind not constrained by a course's curriculum choose Turing over open alternatives like Python, Scheme, etc? |
|
|
|
|
 |
DemonWasp
|
Posted: Tue Apr 07, 2009 12:13 am Post subject: RE:java and c++ |
|
|
Because I haven't looked at the Python tutorials here, so I have no idea whether they're complete / any good. I also don't know Python.
Besides, you're probably talking about someone who doesn't know what a command line is, so you have to factor that in. |
|
|
|
|
 |
Tony

|
Posted: Tue Apr 07, 2009 12:27 am Post subject: Re: RE:java and c++ |
|
|
Sniper4Life @ Mon Apr 06, 2009 9:02 pm wrote: what should i start off with in computer sciences?
DemonWasp @ Tue Apr 07, 2009 12:13 am wrote: ...someone who doesn't know what a command line is...
Sounds like we found an excellent place to start! |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
Sponsor Sponsor

|
|
 |
wtd
|
Posted: Tue Apr 07, 2009 1:21 am Post subject: RE:java and c++ |
|
|
Tony speaks the truth. |
|
|
|
|
 |
DemonWasp
|
Posted: Tue Apr 07, 2009 1:56 am Post subject: RE:java and c++ |
|
|
Hmmm...do we have a tutorial for the CLI (particularly on Windows, as that's where I'd assume most of the newbies to be)? |
|
|
|
|
 |
Sniper4Life

|
Posted: Tue Apr 07, 2009 7:21 am Post subject: Re: java and c++ |
|
|
lol ok
i know what a command line is and i can make only simple cmd files (like once i made the matrix ...1s and 0s going down at a set speed...and colour green...with spaces between em...)..using c++ i made that
i know basic stuff but thats bout it
like i think the most advanced thing i might kno is arrays?
srry i didnt explain better earlier...but cus i had to go to sleep
so i kno basic c++....basic HTML...and ya...just the basics... |
|
|
|
|
 |
saltpro15

|
Posted: Tue Apr 07, 2009 8:00 am Post subject: RE:java and c++ |
|
|
sinper4life, I assume you mean .exe files? and C++ is an excellent language, but probably not the best one to start with, I would recommend Turing or Python to start |
|
|
|
|
 |
Sniper4Life

|
Posted: Tue Apr 07, 2009 11:38 am Post subject: Re: java and c++ |
|
|
no i meant batch files...and k ima start with python......
btw...kno any good sites to start with python? |
|
|
|
|
 |
saltpro15

|
Posted: Tue Apr 07, 2009 1:06 pm Post subject: Re: java and c++ |
|
|
well this is what I read to get started, it's good for beginners |
|
|
|
|
 |
Sniper4Life

|
Posted: Tue Apr 07, 2009 5:58 pm Post subject: RE:java and c++ |
|
|
thanks the tutorials are very "noob" friendly
should be pretty easy to learn
thanks saltpro
also its very easy to be because i understand all of these things in c++ so its easy to adapt |
|
|
|
|
 |
|