Page 90 - Introduction to Programming with Java: A Problem Solving Approach
P. 90

                 56 Chapter 3 Java Basics
CHAPTER 3
    Java Basics
Objectives
• Write simple Java programs.
• Learn about style issues such as comments and readability.
• Declare, assign, and initialize variables.
• Understand primitive data types—integer, floating point, and character.
• Understand reference variables.
• Use the String class’s methods for string manipulation.
• Use the Scanner class for user input.
• Optionally, learn about GUI input and output with the JOptionPane class. Apago PDF Enhancer
Outline
3.1 Introduction
3.2 “IHaveaDream”Program 3.3 CommentsandReadability 3.4 TheClassHeading
3.5 ThemainMethod’sHeading 3.6 Braces
3.7 System.out.println
3.8 CompilationandExecution 3.9 Identifiers
3.10 Variables
3.11 AssignmentStatements
3.12 InitializationStatements
3.13 NumericDataTypes—int,long, float, double
3.14 Constants
3.15 ArithmeticOperators
3.16 ExpressionEvaluationandOperatorPrecedence
3.17 MoreOperators:Increment,Decrement,andCompoundAssignment
  56








































































   88   89   90   91   92