Skip to end of metadata
Go to start of metadata

Classes and Objects

  • Objects are collections of related code and data
  • Everything in Java and Groovy can be considered an object
  • A class is a higher level description of an object.
    • For example a 10-Q is a specification developed by the SEC and can be thought of as a "Class". A quarterly report issued by IBM for Q2 2005 can be thought of as an object of the class 10-Q.
  • Documentation for java classes can be found here
  • Documentation for Groovy extensions to Java classes can be found here
  • No labels

3 Comments

  1. Not much of a tutorial, eh?  The Java docs provided by Sun read like stereo instructions - it's the main reason why I've stayed away from Java for so long.  Having the tutorial just point to the Sun docs defeats the whole point I see behind Groovy - making it less like Java and more like Ruby (and languages like it).  It's the only reason why I'm even LOOKING at Groovy.

  2. Thats got to be one of the most obtuse examples of describing the difference between a 'class' and an 'oject' that I've ever seen!

    How about the simple: Dog is an example of a class, whereas Rover is an object (of class Dog)

  3. So... I came here to see how class definition was the same or different than Java class definition. I already know what a blinkin' class is.

    static/private/protected syntax?

    main method/constructor syntax?

    class/instance variable syntax?

    Opening the definition of an existing class or instance and adding stuff? 

    All of the above should be on this page and more.