
-----------------------------------
matt271
Mon Apr 06, 2009 2:02 pm

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

-----------------------------------
rdrake
Mon Apr 06, 2009 2:18 pm

RE:java and c++
-----------------------------------
Why yes, yes it is.  Check out the [url=http://java.sun.com/docs/books/jni/]Java Native Interface.

Best of luck to you.

-----------------------------------
DemonWasp
Mon Apr 06, 2009 2:37 pm

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
Mon Apr 06, 2009 9:02 pm

RE:java and c++
-----------------------------------
hiya :D
id like to ask a couple of questions too
im an 8th and has taken an interest in computer science :D
of course i cant really get classes and things yet (starting a class in september tho :D)...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
Mon Apr 06, 2009 11:15 pm

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 [url=http://compsci.ca/v3/viewtopic.php?t=8808]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
Mon Apr 06, 2009 11:50 pm

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
Tue Apr 07, 2009 12:13 am

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
Tue Apr 07, 2009 12:27 am

Re: RE:java and c++
-----------------------------------
what should i start off with in computer sciences?
...someone who doesn't know what a command line is...
Sounds like we found an excellent place to start!

-----------------------------------
wtd
Tue Apr 07, 2009 1:21 am

RE:java and c++
-----------------------------------
Tony speaks the truth.

-----------------------------------
DemonWasp
Tue Apr 07, 2009 1:56 am

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
Tue Apr 07, 2009 7:21 am

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 :D...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
Tue Apr 07, 2009 8:00 am

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
Tue Apr 07, 2009 11:38 am

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
Tue Apr 07, 2009 1:06 pm

Re: java and c++
-----------------------------------
well [url=http://www.sthurlow.com/python] this is what I read to get started, it's good for beginners

-----------------------------------
Sniper4Life
Tue Apr 07, 2009 5:58 pm

RE:java and c++
-----------------------------------
thanks the tutorials are very "noob" friendly :D
should be pretty easy to learn :D
thanks saltpro

also its very easy to be because i understand all of these things in c++ so its easy to adapt
