What are the two ways in which Java program can be written?