Skip to content
EricDeiman edited this page Oct 29, 2015 · 17 revisions

Hey, what's that new folder .settings thing for?

Eclipse is a program that has many things that you can customize in it. Some of those customizations are stored in the file org.eclipse.jdt.core.prefs in this folder. These settings are specific for this SecondThingsSecond project and won't always be set the same way for other projects. This file is not intended for people to change directly. Instead, you make changes to menus and dialog boxes in Eclipse, and Eclipse writes out this file.

So, why wasn't it in the FristThingsFirst folder?

When I made the FirstThingsFirst project, I was using the default settings for Eclipse and there were no customizations to store. As I've been working on the SecondThingsSecond project, I wanted to have things configured in a way I'm more used to and I think is easier to read.

There's a HelloWorld.java file in the src folder, just like in FirstThingsFirst. I thought this was new?

Yes, you might recognize the file in the source folder as the file from the FistThingsFirst folder. But, it's not identical--we're going to be expanding it in this lesson. In particular, we're going to be adding a game.

You mean like a first-person shooter? Or Minecraft?

No, not a first person-shooter or Minecraft (but, Minecraft is written in Java, so what you're learning here can help you make mods for it). We haven't covered enough of the Java language and libraries to be ready for those kinds of games yet. We're going to work on a guessing game in this lesson.

But first, I want to go over the changes I made to the code in HelloWorld.java that is copied from the FirstThingsFirst folder.

OK. So, what does that import thingy mean again?

In Java, there's a way to package code that gets used over and over again into what's called a (code) library. This package can then be used by other people. To tell a Java program we want to use code from a library, we use an import statement. I'll go over what random and scanner are after a couple of more headlines.

  • Sidebar comments
  • More explanation about empty lines to group code, and about how programming is for humans first and computers second
  • Introduce the if test ** array access ** zero-based indexing ** equality (vs. assignment) ** logical or operation ** character constants (vs. strings)

Shall we play a game?

  • How the random number bound parameter works
  • More on Scanner ** It uses System.in like we did before
  • booleans ** true and false
  • While loops ** the not operator
Clone this wiki locally