Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do you introduce objects in the first tutorial?

 
Campbell Ritchie
Sheriff
Pie
Posts: 50276
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We see lots of people here who seem not to know how to create an object. They do everything in the main method and seem to have no end of difficult creating the simplest classes to create objects from.

Where do you introduce objects in the tutorial?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15495
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at Oracle's Java Tutorials, you'll see that the very first lesson (Getting Started) is only a five line "Hello World" program. The first thing in the next tutorial (Learning the Java Language) is learning what objects are (Object-Oriented Programming Concepts / What Is an Object?). So in the Oracle tutorials, it's the first thing you'll learn after a trivial "Hello World" program.

Since Java is an OO language I think it's important to explain concepts such as objects and classes early.
 
Prabaharan Gopalan
Ranch Hand
Posts: 66
Java Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was a guy without any programmatic experience and wrote everything in main(). Later, people taught me OO relating it to real life and then they said how to do things the Object way in Java. Drawing from my experience, even if we don't start with OO in our Java tutorials, a brief background on OO would be good for folks who are starting to learn Java. IMO, syntax can be learnt anytime but once we start with syntax, it tends to go that way until we have to break the flow and say - 'hey, you know what? strings, ints and public static void main are fine, yeah we know we said we'll learn about println later but before that you need to know about objects'. sounds a bit odd. my 2 cents.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic