Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Learning Java: Day 13

Working With Swing Components

Component is the more correct term for what I've been referring to as widgets. Those are the things you put in a GUI, or the things that the user sees and interacts with. Almost every thing you can stick in a GUI extends from javax.swing.JComponent.

Chapter 13 of Head First Java covers the layout managers for JPanel and JFrame, creating scrollbars on textboxes, making lists, and finally, creating the BeatBox midi player.

Fact 1: Different layout managers have different policies and you have to memorize what they are if you want your buttons/textboxes/lists/etc to be placed where you actually want them to be.

Fact 2: BorderLayout is the default layout manager for a frame; FlowLayout is the default for a panel.

Fact 3: When you add a component to another component, the added component is controlled by the layout manager of the background component.

Three layout managers: border, flow, and box.
BorderLayout: the BorderLayout manager divides a background component into five regions (NORTH, SOUTH, EAST, WEST, CENTER). You can only add one component per region to a background controlled by a BorderLayoutManager. This is the default layout manager for a frame.

FlowLayout: the FlowLayout manager lays out components from left to right, top to bottom, in the order they were added, wrapping to a new line when needed. This is the default layout manager for a panel.

BoxLayout: the BoxLayout manager places components from top to bottom, one per line.

Most of my time spent in this chapter was typing the code for the BeatBox and then debugging it prior to compiling. Debugging might be the most useful skill I'll learn as I work my way through the book.

School is starting on September 8th.  I still have 5 more chapters and 2 appendices to work through before school begins.  I've gotta work faster!

Learning Java: Day 12

Do It Yourself Graphical User Interfaces

Chapter 12 of Head First Java  goes over the ins and outs of creating GUIs - Graphical User Interfaces. We learn to deal with Event Handling and Inner Classes while moving from command line inputs and outputs to creating our first graphical anything.

This chapter has taken me four days to get through; in part because it's a long chapter, partly because I've been busy with the house and family, but mostly because it's been difficult for me to understand.  Not to mention my self-induced buggy code. On the other hand, I'm getting MUCH better at debugging my code.

To make a very long story short:

Import the javax.swing package when you want to put a window on the computer screen.
JFrame is what makes a window to put your widget (button, text field, image, over a dozen different types) on.

An Event is what happens when the user does something with the screen widget (i.e. clicks a button.)

Each widget needs a Listener to tell the class that an event occurred.

Import java.awt.* when you want to use the java Graphics components for drawing, filling, setting colors, and manipulating those aspects of 2D drawing.

If you want more than one widget in a window, use Inner classes.

We created three versions of the midi player:
  1. The player gave a sound-only output of ascending piano notes.
  2. The player gave an output of ascending piano notes while printing "la" in the command window for each note that was played.
  3. A new window was created with a randomly placed rectangular box with randomly selected fill-color for each randomly selected piano note (64 times)
Yay! I'm finally creating graphics and sound!  It's still a little foggy but it's a start!




Learning Java: Day 11

Exception Handling
Anytime you work with computers, stuff happens. The server is down. The network is offline. The file is corrupted.  As a programmer you need to write code that can handle the bad times; problem-handling code for when you can't guarantee that the file will be in the right directory, the server will be up and running, or the Thread stays asleep. Chapter 11 of Head First Java covers this kind of problem anticipation.

We will be building a MIDI Music Player.  Over the next three chapters we'll learn to create a graphical user interface (GUI) and a multi-user BeatBox Drum Machine. Today we learn what is required to create a MIDI player and how to handle exceptions.

Risky Business
When your code calls a risky method -- a method that declares an exception -- it's the risky method that throws the exception back to you, the caller. You have to read the API docs to see if there is risky behavior in the code.  The method has to declare the exceptions it might throw. The API docs then tell you WHEN you might get that exception, such as resource restrictions because the object (in this case, the sequencer) might already be in use. It's up to you to write code to deal with the problem.

Checked Exception vs RuntimeException
RuntimeExceptions occur because you've got flaws in your code that need to be fixed before the code will compile.
Checked Exceptions happen while the program is running and are caused when a method throws an exception with the keyword throw,  followed by a new exception object:
     throw new noJuiceFastException();
Methods that might throw a checked exception must announce it with a throws Exception declaration. Methods can throw more than one exception.

Try/Catch
A try/catch block tells the compiler that you know an exceptional thing could happen in the method you're calling, and that you're prepared to handle it. The compiler doesn't care how you handle it; it cares only that you say you're taking care of it.

  • Exceptions are polymorphic
  • Write a different catch block for each exception that you need to handle uniquely.
  • Multiple catch blocks must be ordered from smallest to biggest.
Making Sounds
You need four things:
  1. Sequencer: The thing that plays the music
  2. Sequence: The music to be played...a song
  3. Track: The part of the Sequence that holds the actual information
  4. Midi Event: The actual music information (notes to play, how long, etc.)
Today we use command line arguments to experiment with sounds. Next chapter we create MIDI events using a very crude video that pulses to the beat of the MIDI music. 

Onward...

Learning Java: Day 10

Numbers and Statics
We are what we repeatedly do.  Excellence then, is not an act, but a habit.
- Aristotle
Today marks the halfway point in the book, Head First Java. Yesterday I was wondering why I was so determined to learn this programming language, especially since it is not even remotely similar to my upcoming Master's degree studies of acupuncture and Oriental medicine. Java is difficult for me to learn and frequently I've felt really, really dumb because it's taken so long to wrap my mind around some of the concepts. I've told people who've asked me why I'm bothering to learn programming, that I want to be able to create Android phone apps for use in my master's studies, so therefore I need to know Java (since the phone apps are created in Java). But I think the answer lies deeper than that. 

I want to learn Java because it's difficult for me.  I want to conquer this subject. I want to learn Java because it's just one of the many things I want to learn or do before I die. So let's get on with it...
______________________________________
STATIC
The keyword static lets a method run without any instance of the class.  This is used when you don't need to have an instance of the class (like when using the Math methods). 

You call a static method using the class name

Example:     Math.min(66,99);
You call a non-static method using a reference variable name
Example:     Werewolf Jacob = new Werewolf();
          Jacob.howl();

Static variable: value is the same for All instances of the class.
Static variables are shared.
All instances of the same class share a single copy of the static variables.
Instance variables: 1 per instance
static variables: 1 per class

FINAL means it can never change
A final variable means you can't change its value.
A final method means you can't override the method.
A final class means you can't extend the class (i.e. you can't make a subclass).

MATH
Converting a String to a primitive value ('parseInt', 'parseDouble', or 'parseBoolean'): 
     String s = "2";
     int x = Integer.parseInt(s);

Converting a primitive number into a string (easiest way is to concatenate the number to an existing string)
     double d = 42.5;
     String doubleString = " " + d;

     double d = 42.5;
     String doubleString = Double.toString(d);

FORMAT
%,d means "insert commas and format the number as a decimal integer."
%.2f means "format the number as a floating point with a precision of two decimal places."
%,.2f means "insert commas and format the number as a floating point with a precision of two decimal places."
Formatting Dates (Use java.util.Date when you want the current date and time):
%tc gives the complete date and time: String.format ("%tc", new Date()); 
          Fri Aug 17 23:58:29 HST 2012
%tr gives just the time: String.format ("%tr", new Date());
          11:58:29 PM
%tA %tB %td gives the Day of the week, month and day
     Date today = new Date();
     String.format ("%tA, %tB, %td", today,today,today)(there's an easier way but I can't get it to format correctly on this screen)
                    Friday, August 17

Use java.util.Calendar for date manipulation.
There are a LOT of methods in the Calendar API and a lot of Calendar Fields.
And we finally end with practice and exercises.  This was a very LONG chapter. My brain is fried...


Learning Java: Day 9

Constructors and the Garbage Collection
Have you ever run a software program that slowed down after you'd been working for a while, and it got so bad that you had to close the application and restart it in order to continue working?  That's what happens when the programmer doesn't pay close attention to getting rid of objects when those objects are done doing "its thing".  Those abandoned objects continue taking up RAM, so much so that eventually you run out of memory space and have to close the program in order to free the memory space up again.  Java automatically takes out the trash for you.

Chapter 8 of Heads Up Java covers how objects are created, where they live while they're alive, and how to keep or abandon them efficiently.

There are two areas of memory that are important in Java; the Stack and the Heap. 

The Heap is also known as "The Garbage Collectible Heap".  The Heap is where ALL, ALL, ALL objects live. The instance variables that belong to the object live inside their objects on the heap, too. 

The Stack is where method invocations (like go() and doStuff() and main()) along with local variables live. A local variable is alive until its method completes. A local variable is in scope only within the method in which the variable was declared.  You can only use that local variable while its method is actually running.  As soon as the method is completed, the variable is popped off the Stack and goes into garbage collection.

How Objects Are Created
  1. Declare a reference variable:                     Dog myPuppy = new Dog();
  2. Create an object                                      Dog myPuppy = new Dog();
  3. Link the object and the reference            Dog myPuppy = new Dog();

Constructors
A constructor looks and feels a lot like a method, but it's not a method.  It's got the code that runs when you say new. It's the code that runs when you instantiate an object. The thing that separates a method from a constructor is the return type. Methods must have a return type, but constructors cannot have a return type.

Overloaded constructors means you have more than one constructor in your class.  To compile, each constructor must have a different argument list.

How Long Does an Object Live?
An object's life depends exclusively on the life of the references referring to it.  If the reference is considered alive, the object is still alive on the Heap.  If the reference dies, the object will die and will be picked up by garbage collection.

3 ways to get rid of an object's reference:
  1. The reference goes out of scope, permanently 
    •  // the reference dies at the end of the method
  2. The reference is assigned another object       
    •  // the first object is abandoned when the reference moves
  3. The reference is explicitly set to null       
    •  // the first object is abandoned when the reference is 'deprogrammed'.
This chapter end with exercises, a puzzle and a five-minute mystery.

Learning Java: Day 8

Interfaces and Polymorphism
Chapter 8 of Head First Java makes my head spin.  Here they explain how to use the Java keyword interface (this is not a GUI interface nor the generic word 'interface') so subclasses can inherit from multiple 'trees'. Therefore, a class from one inheritance tree can extend a class, and implement an interface, while another class might implement the same interface, but come from a completely different inheritance tree.

Did that make YOUR head spin, too?

When using interface you make all the methods abstract so that any class that is in a IS-A relationship MUST implement (i.e. override) the methods in the interface.  You use an interface when you want to define a role that other classes can play, regardless of where those classes are in the inheritance tree. Got that?

  • When you don't want anyone to make a new object of the class, mark the class with the abstract keyword
  • An abstract class can have both abstract and non-abstract methods.
  • If a class has even one abstract method, the class must be marked abstract.
  • An abstract method has no body, and the declaration ends with a semicolon (no curly braces).
  • A Java interface is like a 100% pure abstract class. It defines only abstract methods

Example from the book:
Pet
abstract void beFriendly();
abstract void play();

To DEFINE an interface:
     public interface Pet {...}    //use 'interface' instead of 'class'

To IMPLEMENT an interface:
     public class Dog extends Canine implements Pet {...}

A class can implement multiple interfaces
     public class Dog extends Animal implements Pet, Saveable, Paintable {...}

Remember: A Java class can have only one parent (superclass), and that parent class defines who you are. But you can implement multiple interfaces, and those interfaces define roles you can play.

We are still learning concepts in this chapter so there is no programming yet, just exercises and puzzles.

Hoo boy...

Learning Java: Day 7

Inheritance and Polymorphism

After two days of being too busy to work on java, I'm glad to finally be back. I begin to feel antsy if I'm away from the computer for too long.

Chapter 7 of Heads Up Java teaches inheritance and polymorphism concepts.

Inheritance should be thought of as a top down thing: children inherit from parents, not the other way around. Inheriting code from the superclass above it should have an "is a" relationship. Example (Cup is the superclass, CoffeCup is the subclass of Cup, and EspressoCup is the subclass of CoffeCup) ExpressoCup is a CoffeCup AND EspressoCup is a Cup.

Inheritance means you avoid duplicate code by having all the common code in one place and letting the subclasses inherit the code from the superclass.  If you need to change behavior you just have to make the change in the superclass, then all the subclasses see the changes too. This makes it so you don't break the code further down the line when you have to make modifications.

A subclass inherits all public instance variable and methods of the superclass, but does not inherit the private instance variables and methods of the superclass.

Polymorphism is used in making arrays. The superclass is the array type, the subclasses fill the array, and the superclass method is used on each member of the array.
Example:

MarineLife [] marine = new MarineLife [5];
marine [0] = new Fish();
marine [1] = new Squid();
marine [2] = new Crab();
marine [3] = new Shark();
marine [4] = new MantaRay();

for (int i = 0; i < marine.length; i++) {
     marine[i].eat();  // when 'i' is 0, a Fish is at index 0 in the array, so you get the Fish's eat() method. When 'i' is 4, you get the MantaRay's eat() method.

     marine[i].hide(); // same with the hide() method.

You can then use the polymorphic arguments and return types.
Example:
dave.approach(lionFish); 

class Diver {
     public void approach(MarineLife m) {
          // try to get close to MarineLife at the other end of the 'm' parameter
          m.curious();
          }
}
The 'm' parameter can take ANY marineLife type as the argument, and when the Diver approaches it tells the MarineLife to act curious.  Whichever marineLife is called, that's whose curious() method will run.

class Photographer {
 dave.approach(whaleShark); 
     public void takePhotos() {
          Diver dave = new Diver();
          Shark whaleShark = new Shark();
          Fish lionFish = new Fish();
          dave.approach(whaleShark);
          dave.approach(lionFish);
     }
}
The Diver's approach() method can take any marineLife you give it. As long as the object you pass in as the argument is a subclass of marineLife, it will work.

You can override a method from the superclass (the subclass Shark has a different method for 'curious' than the subclass Squid)

You can overload a method from the superclass (the subclass Crab adds more stuff to the superclass method for 'eat')

The chapter ends with exercises and puzzles.

Learning Java: Day 6

Using the Java Library
Today, in chapter 6 of Head First Java, we are upgrading yesterday's simple version of the DotCom game from a 7-cell/1 dotcom company to a 7 by 7 grid with 3 dotcom companies.

This is a computer automated version of Battleship where the computer randomly sets the three dotcom companies within the grid and the user has to guess where they are. This is still played at the command line and is rather primitive but it's a good learning tool.

I'm surprising myself; as I slowly traverse through the book I understand more of the code. I really did wonder if I was ever going to understand this stuff.  It makes me happy to know that I am STILL CAPABLE of learning difficult material.  It gives me hope that I'll be able to be competitive in graduate school even if java programming requires a vastly different skill set than acupuncture and Oriental medicine.

This chapter explains the arraylist which is so much "smarter" than regular arrays. The arraylist grows and shrinks as objects are added or removed, you can declare and create specific types of objects, you can just "ask" it if it holds a certain object rather than have to loop through each cell, and many other "things" it can do that I haven't learned yet.

We learn new boolean expressions (those are the yes/no type of expressions) And, Or, Not, and NotEquals.
Most important of all, we learn how to look up libraries of java utilities that are pre-written and can be used anytime simply by including an import  at the top of your code. So much code is Already Written for me! Woo hoo!

Short post today.  Most of my practice time was spent debugging my game.  Debugging code is an important skill to learn.  Surely I'll get faster as time goes by.

Tomorrow, besides another java post, I think I'll add a new recipe to this blog. Unlike programming, almost everyone is interested in food...


Learning Java: Day 5

Writing a Program
Yesterday was filled with errands, a doctor appointment, and testing breadfruit recipes for an upcoming recipe book (not mine; I'm just a tester).  I ended up with only two hours to work on learning java before my brain turned off and I had to go to bed.   Today I'm trying to catch up...

Chapter 5 is where I get to create a real game program.  In this case, it's a very simple version of Battleship although instead of ships we're killing Dot Coms. Supposedly, that makes the book a business expense... The book hasn't covered how to create user interfaces yet so everything is still command line driven.  Somewhere in chapter 14 I'll get to learn the really cool stuff but right now I'm still figuratively learning to tie my shoelaces.

What we are learning in this chapter:

Loop de loop
Loops are used to allow the program to cycle through a bit of code over and over again until a certain condition happens. There are three types of loops: while, for, and enhanced for.

While is used when you don't know how many times you need to repeat the loop; you just want it to continue looping until some condition is met. A game where you keep going until you get "killed" would be an example.

The regular for loop is used when you know how many times you want to cycle through the loop. You normally set the counter to zero to start and then specify how many cycles to do. You might use this type of loop when printing out the lyrics to "100 Bottles of Beer (On the Wall)".

The enhanced for is used for traveling through the members of an array (and other "collections" that I haven't learned about yet) You can think of this type of loop as the "for each" loop because it reads "FOR EACH thing in the collection do this...." You might use this type of loop in a children's game, "for each cupcake in the tin, frost it".

We also learn how to make big numbers fit into small numbers (like a long to an int) by chopping them down to fit the space using the cast operator. The result is like chopping off all the numbers after the decimal point and just leaving the whole number.

And we learn to change a string into an int. Don't ask.

The final task was to create the Simple Dot Com game. After working and working at fixing errors in my game code, it finally works. That's HOURS and HOURS of fiddling.  But The Game Works. Yea! Now I can go to bed.


Learning Java: Day 4

How Objects Behave
We are now in Chapter 4 of "Head First Java" and today we learn about object behavior and how state affects behavior and behavior affects state.  No, this is not a book on parenting or sociology, nor a discussion of Washington politics. This is about getting java objects to do what you want them to do. (Now if I could just get the resident teenager to consistently do what I tell her...)

Remember, state is what the class or object "knows" (aka "instance variable"), and behavior is what it "does" (aka "method"). 

First, though, I have to tell you that my genius programmer daughter-in-law explained how to get my program output to show up in the command window (command windows are such a hold-over from DOS days...) I've gone back to the beginning of the book to see if I just missed the instructions on how to get the java file compiled and then run.  Well, kind of.

The computer that I'm using has Windows7 installed on it.  For some unknown reason that is probably user error (that means I don't know what the heck I'm doing), I keep getting error messages when I try to compile my code using the "javac" command even though I'm SURE the path is set correctly.  In desperation, I finally associated the file extension "java" with the "javac.exe" program (control panel / Programs / Default Programs / Associate a file type or protocol with a program / select the .java extension / click the "Change Program" button / click the "Browse" button /; locate the "javac.exe" file (on my machine it is in Program Files\Java\jdk1.7.0_05\bin) / click the "Open" button. Voila, the .java extension is associated with the javac.exe program.

Now when I click on the filename.java file it automatically creates a class file.  THAT'S the file I needed to use to see my program results!  NOT the java file!  DUH!!!!  And I needed to use this format: "java (name of class file without .class extension)" which the book did NOT say, possibly because I was supposed to already know that. Whatever. The result is that I can now see my program output!  Yea! Hurray!  My DIL is brilliant!

"Jen says you're well encapsulated..."
Chapter 4 talks about encapsulation; that means hiding the stuff the class KNOWS (aka instance variables) by making it private so the data can't be changed accidentally (or maliciously) and making the stuff the class DOES (aka methods) public so that objects can access them. Encapsulation is used to help cut down on dumb mistakes like changing your number of items to less than zero, or completely losing the "phone number" (aka reference) to an object or other types of things that can crash a program and ruin your day. 

Remember the Make a Teddy Bear machine that we talked about in Chapter 2? The behaviors were getModel, setModel, getSize, setSize, getClothing, and setClothing.  You'd make the get and set methods public so other objects can access them but keep the state, that is the bearModel, bearSize, and bearClothing information private so some joker doesn't turn your Ballerina Bear into a Secret Service Prostitute without your say so. 

This chapter also discussed the importance of "creating" objects.  You can talk about (write code) objects and their behaviors all day but if you forget to new them (create an instance of an object; basically make an object), you're not going to have anything useful.
You're returning a what?
There's also discussion about how methods must declare a return type even if it doesn't return anything (you know how it is, you have to file a tax return even if you don't get anything back) and when something is returned it must return something compatible with the original type (kind of like expecting a Big Mac when at McDonald's and not a Chalupa.)

The rest of the chapter had the usual exercises and puzzles.  
I'm finding that I'm writing code that I don't completely understand and it is worrying me.  Will I understand more as I go along.  Will I understand everything in the book at the end?  Hoo boy...

Learning Java: Day 3

Variables
Today we are covering Chapter 3 of "Head First Java".

Remember variables from algebra? You know, x + 3 = 10, you solve for the unknown x, so x = 7? Programming uses variables, too.  Remember class and objects from yesterday's lesson? Variables can be objects. The java book defines a variable as a container that holds something. There are two kinds of variables in Java: primitives and references.

A primitive variable can be one of several types: a number (byte, short, int, long, float, double), or a "yes/no, true/false, on/off" answer (boolean), or an alphabetic letter (char). If you really are into this stuff, here's the mnemonic for remembering primitive types: Be Careful! Bears Shouldn't Ingest Large Furry Dogs. (Yep, I know, you're only reading this to be kind and have no interest in learning Java...) Primitive variables are different sizes according to the type.

The other type of variable is an object reference variable. This type of variable is just one size no matter if the object is a bacteria, a movie, a galaxy, or something entirely intangible because this variable only holds the reference to the object rather than the object itself. It's kind of like the phone number to contact the object when the object needs to do something.

You have to tell Java what type, what value and what name your variable has. Kind of like ordering in expensive coffeehouses, "I'd like a grande Salted Caramel Hot Chocolate" (can you tell I'm not a coffee drinker?) To put it in Java terms it would be a "Chocolate (type)  hotSaltedCaramel (name) = grande (value)".  Try that at Starbucks!

A school of fish is a Fish Array
Other things learned in this chapter are arrays (a litter of puppies is a Dog array, a dozen eggs in a carton is an Egg array, dresses in a closet is a Dress array, etc.), how an array is always an object (not plural, an array is a singular object even though it may contain multiple things), and using the dot operator to access the parts of an object.

We end this chapter with exercises and puzzles.

Wow, this took me 4 hours to get through. I can feel my neurons humming...


Learning Java: Day 2

Classes and Objects
Here we are in Chapter 2 of "Head First Java"

I'm having hold-over problems from yesterday. My VERY simple programs compile, but I don't know where the output is going. Translation: The code that I'm writing appears to work correctly but it's supposed to write out simple sentences and I don't know where those sentences are going.  

I've sent out an email distress call  to my programmer daughter-in-law for help. She will undoubtedly find this very funny but will be able to explain in simple words how to view my program output.

Today I learned the difference between a class and an object. A class is like a teddy bear machine and the object is the ballerina teddy bear or the soldier teddy bear (or whatever else kind of bear) that is made by the teddy bear machine.

Each class has things that it "knows" and things that it "does".  So in the example of the teddy bear machine, it would "know" the bearModel, the bearSize, and the bearClothing. The things it "does" might be getSize() (you push the size button), setSize(), getModel() (you push the model button), setModel(), getClothing() (you select the clothing buttons), setClothing(), and assembleBear(). The object, in this example, is the teddy bear that drops out of the machine.

So, a class is like a blueprint, an object is (or objects are) what's made from the blueprint. Or, as the book says, "a class is like a recipe; objects are like cookies."

The rest of the chapter consists of practice, exercises, and a puzzle.

I'm glad this chapter is short.  After a day of housecleaning, laundry, ironing, and baking cookies, there wasn't a whole lot of time to spend on the computer.

I'm pooped.  It's bed time.  Nighty night!

Learning Java: Day 1

This summer I've taken a wonderful break while I've allowed my body to heal.  It's been great for the body but not so good on my mind; I feel an intellectual void. I have one month until I start acupuncture school so it seems like a great time for a challenge: learn Java programming.

Before you say "ewww", let me explain that I love computers.  I have a bachelor of science in Information Technology. I've taken several C and C++ classes in the past and I have to say that I suck as a programmer. I keep thinking that if I just keep practicing I'll "get it" and be able to create usable programs.  Sounds logical, doesn't it?

So I purchased an O'Reilly Java tutorial called, "Head First Java".  The introduction is funny and appealing, the online reviews are very positive, and it has 18 chapters plus two appendices so I can finish the book before school starts if I do one chapter per day.

So there you have it; one Java-clueless older woman, one highly ranked tutorial, and one month to finish (gee, this sounds like "Julie and Julia".)  Here we go...

First you have to install the Software Development Kit (SDK) onto your computer.  You'd think that Oracle (the folks that "own" Java) would have an easily navigable website.  After all, they are computer folks.  But no, this is a place for folks that KNOW WHAT THEY ARE DOING. So after some fiddling around, I finally find the file and get the blasted thing downloaded. Then I had to download the Application Programming Interface (API) documentation so I can look stuff up.  (An API is a piece of code that lets software code from various things like servers/cellphones/fuzzy logic rice cookers/etc. talk to each other) Finding the API documentation was easy; finding the downloadable file took 20 minutes.

Next step was to set the PATH to the java software so the computer knows where to find the compiler.  I had to look up how to do that because it's been a good fifteen years since I've done this. It's going to be a little tougher to get my brain functioning properly than I had anticipated.

The first chapter was a remedial course of beginning programming in writing a class, looping, boolean tests (is it true or false such as: is it greater than, less than, or equal to something), branching, and compiling. Then we moved on to writing code and compiling it. Then exercises and puzzles.

I THINK this will be a good experience.  I hope to finish the book at the end of the month with some usable skills.

Wish me luck!