day3.1cse110

day3.1cse110 - Chapter 2 Data and Expressions 2 Major...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 2 Data and Expressions 2 Major Topics In this chapter we will focus on data representation and manipulation in Java 1)Strings Displaying strings String concatenation using + Displaying special characters 2) Primitive data types in Java Number data types int: int , long, short, byte Float: float, double Character Char Boolean boolean 3) Data variables and their representation in programs. 4) Operations on data types 5) Data input and the Scanner class Displaying Character Strings We have studied how to display a character string using System.out.print, System.out.println commands. The System.out object represents a destination (the monitor screen) to which we can send output System.out.println ("Whatever you are, be a good one."); class method name information provided to the method (parameters) 2.1 Countdown.java //******************************************************************** // Countdown.java Java Foundations // // Demonstrates the difference between print and println. //******************************************************************** public class Countdown { //----------------------------------------------------------------- // Prints two lines of output representing a rocket countdown....
View Full Document

This note was uploaded on 12/08/2010 for the course CSE 110 taught by Professor Kim during the Spring '08 term at ASU.

Page1 / 12

day3.1cse110 - Chapter 2 Data and Expressions 2 Major...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online