Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

phreakout13

macrumors 6502
Original poster
Jan 4, 2004
317
0
South Eastern MA
Hello! I've always wanted to try programming, so I decided if I wanted to pick something to learn it would be Java. My friend told me it's not too hard to learn. I was wondering if anyone could give me some tips or recomend a site that explains the basics of object oriented programming and using Java. I don't know any other languages, so I must start from the beginning. Is Java even possible to learn as a first computer programming laguage? Thanks:)
 

slooksterPSV

macrumors 68040
Apr 17, 2004
3,544
306
Nowheresville
It is, just google for java programming tutorial or... I'd recommend learning a simple programming language first to give you basics for example QBasic, Python is a good one, or even just learn a few things about C. C, C#, C++, and Java all use the same concept of how to stylize code. Or even learn HTML and Javascript to give you a bit of an idea, Javascript looks a lot like C or C++.
PHP:
var x = 0;
function MyJavaScriptFunction(a)
{
 alert(a + ' equals ' + x);
}
<!-- Now if I call the function like this: MyJavaScriptFunction('The one variable I programmed in');//-->
Its output is this:
Output: The one variable I programmed in equals 0

Thats javascript so yeah.
 

phreakout13

macrumors 6502
Original poster
Jan 4, 2004
317
0
South Eastern MA
Thanks for the tips and such. I'm just starting to read what object oriented programming is, so it'll be a while before I learn actual programming. When I do, however, and I make small programs and such, what do I do with them to run them? Like, say I make a program on text edit, where do I paste it to test running it? Thanks:)
 

notjustjay

macrumors 603
Sep 19, 2003
6,056
167
Canada, eh?
Get a package called Eclipse. I use it for developing Java and it's great.

Best way to learn to program in Java (or any language) is to have a (reasonably) friendly interface which will do things like highlight errors in your code and help you do things like step through code line by line. Have a browser window open to the Java API documentation on the web. You'll be set.

Personally, I started learning programming with BASIC, then I went to C, then I learned about object-orientation and learned C++, then Java. And then I learned 8086 assembly language ;)

Java's my favourite for reasonably practical work. I'm old-school though, I still pull out QuickBasic to do very fast prototyping of algorithms etc.
 

superbovine

macrumors 68030
Nov 7, 2003
2,872
0
phreakout13 said:
Thanks for the tips and such. I'm just starting to read what object oriented programming is, so it'll be a while before I learn actual programming. When I do, however, and I make small programs and such, what do I do with them to run them? Like, say I make a program on text edit, where do I paste it to test running it? Thanks:)

you should start with a book that will walk your through the basics. there are books will walk you through the basic. with a book at least it will give you good background with OOP which will carry through other languages. if you don't have a good understanding of OOP java is basically pointless once you start more advanced projects.
 

Blackjack75

macrumors newbie
May 6, 2005
20
0
Books and IDEs

There's a nice free book called Thinking in Java.. a good start or a least a good reference.

http://mindview.net/Books/DownloadSites/

Also thinking of IDEs maybe NetBeans.org is a good choice too. I have been using Eclipse and Xcode . I recently tried the latest NetBeans and I am quite imrpessed (I really disliked it years ago).

- Eclipse for OSX is unfortunately much slower on osx than on my PC
- NetBeans on the other hand runs just fine (ibook 1.2 ghz)
- Xcode is very nice if you want to build apps for apple computers only, especiall in objectiveC and the excellent interface builder. but for java it really isn't ready (no refactoring... lousy parser that's unable to find completions half of the time.)

Good luck :)
 

slooksterPSV

macrumors 68040
Apr 17, 2004
3,544
306
Nowheresville
I learned C++ from a book, it was called C++ for the Absolute beginner, and they have Java for the absolute beginner, you make games, and learn at the same time too, its awesome. Look for one of those.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.