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.
* Java tutorials : an accessible online reference that should cover most of what we need.
* Java Supplements: downloadable supplements from Liang's book.
* Java 8 API's : -- it is official and comprehensive, but it 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.
* Video for your first eclipse project, or a downloadable supplement: both from Liang's book
* Eclipse help and Eclipse FAQs: courtesy of the official Eclipse organization
* 30 Eclipse shortcuts or 93 useful keyboard shortcuts : worth learning some tricks. Note: "control+" in Windows is "command+" in Mac !!
- 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!