class02 Notes

class02 Notes - IST 240 Introduction to Computer Languages...

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

View Full Document Right Arrow Icon
1 IST 240 Introduction to Computer Languages Spring 2008 Section 2: T/Th 11:15-12:30 206 IST Tracy Mullen (see Angel Syllabus for other information) 2.1 – The println Method ± In the HelloWorld program from Chapter 1, we invoked the println method to print a character string ± 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."); object method name information provided to the method (parameters)
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 2.2 – Variables ± A variable is a name for a location in memory ± A variable must be declared by specifying the variable's name and the type of information that it will hold int total; int count, temp, result; Multiple variables can be created in one declaration data type variable name 2.2 – Variable Initialization ± A variable can be given an initial value in the declaration ± When a variable is referenced in a program, its current value is used int sum = 0; int base = 32, max = 149;
Background image of page 2
3 2.2 – Assignment ± An assignment statement changes the value of a variable ± The assignment operator is the = sign total = 55; ± The expression on the right is evaluated and the result is stored in the variable on the left ± The value that was in
Background image of page 3

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

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

This note was uploaded on 03/31/2008 for the course IST 240 taught by Professor Tracymullen during the Spring '08 term at Penn State.

Page1 / 8

class02 Notes - IST 240 Introduction to Computer Languages...

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

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