Quick Links: [Java FAQs][Eclipse FAQs]
- Java language online help
- The latest version of the Java language is Java 8, but any version above Java 5 should be OK for Java Programming Homework.
Unfortunately, the latest version of Eclipse needs at least Java 7.
Here are supplements from Liang's book Java Supplements.
Here is Java 8 API's -- it is official but overwhelming and unwieldy!
- Eclipse online help
- Eclipse is an integrated development environment (IDE) that we will use for developing Java programs:
It is has many features and can be overwhelming, so there are many tutorials available on the web.
Here is a video for your first eclipse project
30 Eclipse shortcuts or 93 useful keyboard shortcuts
- MacOS Issues
- Apple has a bad habit of not supporting non-Mac software. So if you have special problems on this score, we will try to help.
- Programming tools (Makefile, etc)
- Makefile, bash scripts, etc, are very simple productivity tools to be aware of:
Note that Makefiles can be used with Eclipse.
- Java I/O
- Input/output is extremely important.
We all need at least the ability to output something from a program --
witness the ubiquitous Hello World program, which simply prints a message.
What about reading inputs? Since Java 1.5, there is a very useful class called Scanner from java.util package. You can get a scanner object from the standard System.in (which is an input stream object):
Scanner myScanner = new Scanner(System.in);
Using myScanner, you can now read an arbitrary input line or token (as a string), or any primitive type from the console.
TRICK: after myScanner.nextInt(), you might have a newline character "\n" lying around which you may need to consume with a myScanner.nextLine() before you continue!