teaching machines

CS 145 Lecture 4 – Types

September 10, 2014 by . Filed under cs145, fall 2014, lectures.

Agenda

What’s Wrong With This

  1. show
  2. show
  3. show

Code

Declassignments.java

package lecture0910;

public class Declassignments {
  public static void main(String[] args) {
//    int a;
//    System.out.println(a);
    
//    System.out.printf("I'm %d", 5);
    
    System.out.println('\u265b');
    System.out.println('\u2603');
    System.out.println('\u2672');
    System.out.println('\u2697');
    System.out.println('\u266A');
    System.out.println('\u2682');

    byte b = 127;
    short s = b;
    
    b = (byte) s;
    
    int i = (int) (100 * 0.5);
    System.out.println(i);
  }
}

Haiku

show