Pages

Baby Steps (Java)

README

Practice yourself, for heaven’s sake, in little things;
and thence proceed to greater.

— EPICTETUS (Discourses IV. i)

If you have to think you still do not understand!
You think a fight is one blow? One kick?
Until you can put combinations together without even thinking,
Until you learn how to keep moving and endure,
Hire a body guard or lead a less aggressive life.
Don't charge in blindly.
You've got to listen.

— BRUCE LEE

See Also

The Anatomy of a Java Program

Online Java IDEs

Highbrow

Code

Q&A

Your questions and my answers go here.

Notes

ASSUMING you got here by following the steps of this procedure faithfully, you are off to a strong start and will undoubtedly be burdened by fame and fortune in the future. When that happens, remember my name. Fame’ll be on you, I’m afraid. But I can help carry the weight of your fortune.

Even to your old age and gray hairs I am he,
I am he who will sustain you.
I have made you and I will carry you;
I will sustain you and I will rescue you.

Isaiah 46:4 (NIV)

Exercises

You are encouraged to collaborate; cite your sources; be clear, concise and specific.

  1. What is the current value of the global variable N?
  2. What is the difference between Foobar and FUBAR? What is expurgation, also known as bowdlerization?
  3. Try to compile and execute each of the Java programs listed on the Code tab using one or more of the online IDEs listed on the See Also tab, and answer the following questions.
    1. What do you like or dislike about the IDEs you tried?
    2. Which programs compiled and executed successfully?
    3. Which programs failed to compile? What caused the compile-time errors?
    4. Which programs successfully compiled but failed to execute? What caused the run-time errors?
    5. For each of the programs that failed to compile or failed to execute, modify the code so that each program compiles and executes successfully. Before asking for help or looking at someone else’s solution, try to solve this challenging problem yourself. The time you spend discovering the basic rules for constructing programs and the innumerable ways they may break will pay dividends every time you learn a new programming language.
    6. Provide code listings for the programs that you modified and indicate whether your modifications fixed the software bugs.
    7. While working on this set of exercises, did you have any questions that you couldn’t easily find answers to? What were they?
  4. Not including Java program errors, what mistakes or errors, if any, did you find in this set of exercises?
  5. What suggestions do you have for improving this set of exercises?