Java 8

1 Intro #

The CIS department at Brooklyn College officially supports Java 8. This means that Java courses are taught adhering to this version. Using later versions such as Java 11 is perfectly find for most instances, there may be some minor differences with certain classes and methods or certain version specific-quirks.

The best thing to do is to keep documentation links handy.

These are useful links to reference.

The Java Tutorials for JDK 8 #

Java SE 8 Documenatation #

Java SE 8 API #

Java Code Visualizer #

Concepts #

  • Variables
  • Primitive Data Types
  • Operators
  • Expressions, Statements, and Blocks
  • Control Flow Statements
  • Objects & Classes
  • Arrays

2 Compiling Java on Command Line #

To compile Java source code on the command line, it is with this command where is your filename.


followed by running the executable generated with

java Main

2.1 BC Students can use the WEB Lab Server to compile and run Java code #

Use a terminal friendly app to connect to the server via ssh. A sample command is as follows:

ssh username@hostname

After entering your password, create a directory for your assignment, such as mkdir folder1 and then you can use a command line such as vim, emacs, or nano to edit the file.

2.1.1 You can get your linux server account information from the W.E.B. Computing lab #

You can email the Linux Administrator, Raymond Patitucci or visit their locatio nat

First floor, West End Building P: 718.951.5787

3 Java Books and other resources #

3.0.1 Teach Yourself Java in 21 Minutes #

3.0.2 Java4Kids #

4 Lecture Slides #

  • Java Review

  • Two Dimensional Arrays