Build your knowledge and confidence with easy-to-understand examples and plenty of skill-building exercises. So, whether you just want to try it out to see if you like it or plan on doing more with Java, this is a great place to start!
This course uses the latest release of Java, from Oracle, the company that maintains and supports the language. You will also learn how to use BlueJ, a graphical development environment designed especially for students. Both are free and open-source products and you will receive instructions on how to download and install them. By the time you're done, you will be comfortable with Java programming and ready for more!
Alan Simpson is an award-winning author with over 100 published books on computers, technology, and the internet, translated into more than a dozen languages. With extensive experience across nearly every aspect of the computer industry—including web development, operating systems, programming, networking, and security—he is widely regarded as a leading expert in the field.
Alan’s journey in tech began in the 1980s as an author, teacher, consultant, and software developer. His work in app development and web design sparked a deep interest in cybersecurity. This passion led him to pursue formal studies, and in 2007, he earned his Security+ certification from CompTIA, demonstrating his broad knowledge of the computer security field. The insights he shares in his courses reflect his years of experience and his commitment to building safe, secure applications and websites.
The instructional materials required for this course are included in enrollment and will be available online.
Hide Syllabus
Lesson 1
Introducing Java
Java is one of the most widely used programming languages in the world, on machines from microprocessors in DVRs and microwaves to supercomputers. This lesson will introduce you to computer programming in general and to Java in particular. First, you will be set up with the downloads and installations you will need for the rest of the course. Then, you will explore the process of editing, compiling, and running computer programs written in Java.
Writing Your First Java Program
Now that you have the software downloaded and installed, you're ready to start programming! It's time to write your first Java program. Along the way, you will learn to create projects and classes in BlueJ. You will use the editor to enter your program, and you will find out more about how to compile it and run it.
Working With Java's Primitive Data Types
This lesson is about Java's primitive data types—the building blocks you need to use before you can build more complex types. First, you will learn how to use them in some simple programs and how they relate to each other. Beyond that, you will explore how to use these classes in the Java libraries.
Working With Objects
This lesson introduces classes and objects. You will revisit the HelloWorld application and rewrite it in Java's OOP (object-oriented programming) structure. While doing that, you will look at how to declare classes, objects, attributes, and methods to Java.
Creating a Program That Makes Calculations
This lesson covers how to declare data variables in Java and how to use variables in arithmetic expressions. You will learn about data input, which means getting information into programs from an outside source. Then you will write a program that incorporates all these features.
Computer Logic: Writing Programs That Make Decisions
Making decisions is one of the most important and powerful things a computer language can do. Without decision-making, computers would be big, bulky calculators. This lesson explores the decision-making process in detail and see how Java does it. When you're done with this lesson, you will know how to write Java programs that make decisions based on the principles of computer logic.
Writing Programs With Loops
In this lesson, you will learn to repeat actions using a control structure called a loop. Loops in Java involve decisions, just as branches do. But in a loop structure, if the condition is met, the branch is backward instead of forward.
Fixing Errors in Java
This lesson focuses on how Java generates exceptions and how to prevent them from crashing your programs. You will learn about class methods and how to call them without creating any objects. Last, you will find out about a debugger, which lets you look at what's going on inside the program as it runs.
Three Tools: Debugger, Enumeration, and Switch
This lesson is a grab bag of tools and topics. BlueJ's debugger lets you watch your program's internal actions as it runs. Enumeration lets you set up new data types with built-in limits on their values. Finally, Java's switch structure lets you replace a series of nested if statements with a single value-based structure. You will find all these items useful in future programming!
Formatting Output and the Java Application Program Interface
How can you make numbers and other output look the way you want them to in Java? This lesson looks at Java's application program interface (API). That's the documentation of all the classes that Java includes when you install the JDK, plus explanations of how to use them. The interface has several thousand classes, and it's important to know how to find things within it.
Creating Windows and Adding Graphics in Java
So far in this course, everything has been text-based. This lesson will introduce you to the world of Java windows, and you will look at GUI (graphical user interface) programming in Java. You will also learn about the basic components of a Java window and then add some simple graphics to it.
Java 2-D Animation
In your final lesson, you will continue exploring Java 2-D graphics with a look at some simple animation. You will use the same technique cartoonists have used for a hundred years now: redrawing an image in a slightly different location and repeating that process many times a second so the image appears to move. You will learn to create a self-contained object that "knows" its own size, color, shape, location, and how to draw itself into the window.
Hide Syllabus