lecture2-dan - Variables Primitive Types 5 byte short int...

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

View Full Document Right Arrow Icon
Computer Science E-76 Building Mobile Applications Lecture 2: [Android] Java Primer February 8, 2011 Dan Armendariz [email protected] 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
Java Documentation 2 API: http://java.sun.com/javase/6/docs/api/ Tutorial: http://java.sun.com/docs/books/tutorial/java/TOC.html
Background image of page 2
Variables Naming 3 Begin with letters, $, or _ Subsequent characters also can be numbers Case sensitive No spaces name firstName phoneNumber
Background image of page 3

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

View Full DocumentRight Arrow Icon
Variables Reserved Words 4 abstract continue for new switch assert default goto package synchronized boolean do if private this break double implements protected throw byte else import public throws case enum instanceof return transient catch extends int short try char final interface static void class finally long strictfp volatile const float native super while http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

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

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

Unformatted text preview: Variables Primitive Types 5 byte short int long float double boolean char Variables Objects 6 String BigDecimal Variables Arrays 7 int grades; grades = new int[15]; Control Flow If-else statements 8 if (boolean) { // perform this code } else { // otherwise, run this } Control Flow Switch 9 switch (variable) { case 1: //code break; case 2: //code break; default: //code } Control Flow While Loops 10 while (boolean) { // code } Control Flow For Loops 11 for (init.; term.; update) { // code } Computer Science E-76 Building Mobile Applications Lecture 2: [Android] Java Primer February 8, 2011 Dan Armendariz [email protected] 12...
View Full Document

This note was uploaded on 11/11/2011 for the course MATH 180 taught by Professor Byrns during the Spring '11 term at Montgomery College.

Page1 / 12

lecture2-dan - Variables Primitive Types 5 byte short int...

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

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