Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Introduction to Java programming, Part 1: Java language basics

Object-oriented programming on the Java platform

J Steven Perry (steve.perry@makotoconsulting.com), Principal Consultant, Makoto Consulting Group, Inc.
Photo of J Steven Perry
J. Steven Perry is a software developer, architect, and general Java nut who has been developing software professionally since 1991. His professional interests range from the inner workings of the JVM to UML modeling and everything in between. Steve has a passion for writing and mentoring; he is the author of Java Management Extensions (O'Reilly), Log4j (O'Reilly), and the IBM developerWorks articles "Joda-Time" and OpenID for Java Web applications." In his spare time, he hangs out with his three kids, rides his bike, and teaches yoga.

Summary:  This two-part tutorial introduces the structure, syntax, and programming paradigm of the Java™ language and platform. You'll learn the Java syntax you are most likely to encounter professionally and Java programming idioms you can use to build robust, maintainable Java applications. In Part 1, J. Steven Perry guides you through the essentials of object-oriented programming on the Java platform, including fundamental Java syntax and its use. You'll get started with creating Java objects and adding behavior to them, and conclude with an introduction to the Java Collections Framework, with considerable ground covered in between.

View more content in this series

Date:  19 Aug 2010
Level:  Introductory PDF:  A4 and Letter (602 KB | 65 pages)Get Adobe® Reader®

Activity:  386014 views
Comments:  

Before you begin

Find out what to expect from this tutorial and how to get the most out of it.

About this tutorial

The two-part "Introduction to Java programming" tutorial is intended to get software developers who are new to Java technology up and running with object-oriented programming (OOP) and real-world application development using the Java language and platform.

This first part is a step-by-step introduction to OOP using the Java language. The tutorial begins with an overview of the Java platform and language and is followed by instructions for setting up a development environment consisting of a Java Development Kit (JDK) and the Eclipse IDE. Once you have been introduced to your development environment's components, you will begin learning basic Java syntax hands-on.

Part 2 covers more-advanced language features, including regular expressions, generics, I/O, and serialization. Programming examples in Part 2 build on the Person object that you begin developing in Part 1.


Objectives

When you've finished Part 1, you will be familiar with basic Java language syntax and able to write simple Java programs. You should follow up with "Introduction to Java programming, Part 2: Constructs for real-world applications" to build on this foundation.


Prerequisites

This tutorial is for software developers who are not yet experienced with Java code or the Java platform. The tutorial includes an overview of OOP concepts.


System requirements

To complete the exercises in this tutorial, install and set up a development environment consisting of:

  • JDK 6 from Sun/Oracle.
  • Eclipse IDE for Java Developers.

Download and installation instructions for both are included in the tutorial.

The recommended system configuration is:

  • A system supporting Java SE 6 with at least 1GB of main memory. Java 6 is supported on Linux®, Windows®, and Solaris®.
  • At least 20MB of disk space to install the software components and examples.

1 of 18 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Java technology
ArticleID=507256
TutorialTitle=Introduction to Java programming, Part 1: Java language basics
publish-date=08192010
author1-email=steve.perry@makotoconsulting.com
author1-email-cc=jaloi@us.ibm.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers