which java
which javac
java -version
javac -version
Start a terminal window.
Create a file called Hello.java.
touch Hello.java
Edit Hello.java with vim or nano so that it contains the code below.
public class Hello {
public static void main(String[] args) {
System.out.println("Hello Java!");
}
}
javac Hello.java
java Hello
Now, copy all the text from the terminal, and paste it into the PasteTerminalHistory.txt file. And you're done. See, easy lab.