Graphics support in Android is extensive - from the simple display of images and 2D graphics through animation and on to full 3D rendering. To cover it all needs a separate book, and even then there ...
This draws a line from 0,0 to 500,500 and as the Bitmap is 500 by 500 pixels this draws a diagonal line across the entire bitmap. Again the numeric values all end in F because the method needs float ...