03-jan23

03-jan23 - PrimitiveTypes,Strings,and ConsoleI/O...

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

View Full Document Right Arrow Icon
COMP 110 Primitive Types, Strings, and Console I/O Tabitha Peck M.S. January 23, 2007 MWF 3-3:50 pm Philips 367 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Announcements Lab 1 Due Friday Before Class Follow submission instructions .jar tutorial 2
Background image of page 2
Questions? 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Today in COMP 110 Primitive Types and Expressions Strings Console I/O 4
Background image of page 4
Variables Used to store data in program The data currently in a variable is its value Name of variable is an identifier Can change value throughout program Choose variable names that are helpful!!! 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Variable Declarations Syntax: Type Variable_1 , Variable_2 , …; Examples: int count, score, myInt; char letter; double totalCost, ratio; 6
Background image of page 6
How to name an identifier Letters, digits(0-9), underscore (_) First character cannot be a digit Java is case sensitive Legal names pinkFloyd, the_coup, b3atles Illegal names michael.bolton, kenny-G, 1CP 7
Background image of page 7

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

View Full DocumentRight Arrow Icon
Keywords Reserved words with predefined meanings You cannot name your variables keywords Appendix 1 if , else , return , new 8
Background image of page 8
Type What kind of value the variable can hold
Background image of page 9

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

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

Page1 / 29

03-jan23 - PrimitiveTypes,Strings,and ConsoleI/O...

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

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