In this lab, we will practice with vim, command line interface, and writing your first Java code. Bring your laptop.
You and the instructor will work on vim together to learn some key features of the editor. The instructor will try some vim commands with you together (you will follow along on your own machine) to teach you some key features.
We will do some practice together during a demo using this File (LICENSE.txt). Please right click on the link and select 'save link as' (or a similar wording, as the exact wording varies by browser). Save the file into your home folder (or some folder that you use for CSE 114). Also download this file (Hello.java) in the same manner. Please use the same file names as you download and save them on your computer.
After the instructor teaches you some basic features of vim, finish the vim tutorial from Lab 1 if you did not finish it earlier.
There are many different vim commands, but the key is to understand the basic ones for now. In addition to the resources in Lab 1, this vim cheatsheet can be used as a reference for vim commands.
Using vim, write a Java program named Poem.java
with a
class named Poem
in it. This program should print a poem that is at least six
lines long. Compile it and run it several times making
sure that your program generates the output that you expect.
Read the comments in the Hello.java
file that you
downloaded earlier above and try the commands
(javac
, java
, and javap
).
If you did not finish it all in the lab, you may finish the rest afterwards, but do finish it!