Chapter 3: Introduction to Objects and Input/Output
Chapter 3: Introduction to Objects and Input/Output
Friday, November 5, 2010
Chapter Objectives
Learn about objects and reference variables. Explore how to use predefined methods in a program. Become familiar with the class String. Learn how to use input and output dialog boxes in a
program. Explore how to format the output of decimal numbers
with the String method format.
2
Friday, November 5, 2010
Java Variables
1. int x; 2. x=45; 3. String str; 4. str = "java programming";
3
Friday, November 5, 2010
Java Variables
There are two types of variables in Java:
primitive type variables reference variables.
Primitive type variables directly store data into their memory space.
int x; x = 45;
The variable x can store DIRECTLY an int value in its memory space.
The second statement DIRECTLY stores 45 in x.
4
Friday, November 5, 2010
Object and Reference Variables
In reality, str = "Java Progrmming" =
String str = new String("Java Programming");
The variable str cannot directly store data in its memory space.
The variable str stores the memory location, that is, the address of the memory space where the actual data is stored.
5
Friday, November 5, 2010
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- cse 2231 java input output
- input and output in java
- programming languages cse 413 autumn 2002 java input
- input and output
- output streams unibz
- input and output pcc
- topic 18 file input tokens
- java files copyright © tutorialspoint
- chapter 3 introduction to objects and input output
- java input output core web programming
Related searches
- introduction to finance and accounting
- java input output examples
- java input output file
- input output in java
- introduction to leadership and management
- java input output stream
- output and input calculator
- introduction to language and linguistics
- introduction to leadership and governance
- introduction to philosophy and logic
- introduction to positive and negative numbers
- introduction to food and beverage service