unchecked exception


  • for convenience because runtimeexception can happen anywhere
  • you can catch it but don’t have to
  • checked exception has to be caught or thrown



open file mode

The file open modes are not really specific to ruby – they are part of IEEE Std 1003.1 (Single UNIX Specification). You can read more about it here:http://pubs.opengroup.org/onlinepubs/009695399/functions/fopen.html

r or rb
    Open file for reading.
w or wb
    Truncate to zero length or create file for writing.
a or ab
    Append; open or create file for writing at end-of-file.
r+ or rb+ or r+b
    Open file for update (reading and writing).
w+ or wb+ or w+b
    Truncate to zero length or create file for update.
a+ or ab+ or a+b
    Append; open or create file for update, writing at end-of-file.


android is an operating system.

R.java global file for all activities

start emulator: project->run as Android or window->android

androidmanifest : meta data for the app; it has entry point that you can set up.

each activity is a screen

hello_activity.java file: transfer from screen to screen: button.setOnClickListener() {

public onClick() { Intent intent = new Intent(currActivity, nextActivity); startActivity(intent); }


button tag is created in the activity_hello.xml file, which is the layout

layout : view

all the string variable is defined string.xml

R.java is an automatically generated file from the variables defined string.xml or other variables