Skip to main content

Some Java Basics

  • Chapter
Beginning Java Objects
  • 1611 Accesses

Summary

In this chapter, you’ve learned some of the advantages of Java as an OO programming language—namely, that

  • Java is an elegant OO programming language that improves upon many languages that preceded it.

  • Java was designed from the ground up to be fully object-oriented.

  • Java is architecture neutral.

  • All of the facilities necessary for building industrial-strength applications are integrated into the core Java language.

  • Java is an open-source language.

  • Java can be downloaded for free from the Sun Microsystems http://java.sun.com web site.

In addition to exploring some of the advantages of Java, you’ve also learned some basic elements of Java syntax. In particular, we covered

  • The anatomy of a simple Java program

  • The mechanics of how to compile and execute a Java program from the command line

  • The eight primitive Java types and the String type

  • How variables of these types are declared and initialized

  • How an expression of one type can be cast into a different type, and when it’s necessary to do so

  • Arithmetic, assignment, logical, and relational expressions and operators

  • Loops and other flow-control structures available with Java

  • How to define blocks of code, and the concept of variable scope

  • How to print text messages with the System.out.println and System.out.print methods

  • Some basic elements of good Java programming style

There’s a lot more to learn about Java—things you’ll need to know in building the application in Part 3 of the book—but I need to explain a number of basic object concepts first. So, on to Chapter 3!

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Jacquie Barker

About this chapter

Cite this chapter

(2005). Some Java Basics. In: Beginning Java Objects. Apress. https://doi.org/10.1007/978-1-4302-0036-9_2

Download citation

Publish with us

Policies and ethics