
An overview of what you'll be able to do through this course.
Set up the brand new Java 9 on your PC, Mac, or Linux computer
How to install Eclipse IDE for Java Developers
Eclipse's WindowBuilder Editor allows us to build graphical user interfaces (GUI) using a visual editor for Windows, Mac, and Linux.
Installing and running Android Studio
By special request :) - several students asked for a video showing the complete installation on Windows PC's - this is the latest version with Java 8 & 9, Eclipse + WindowBuilder, and Android Studio.
Run JShell, and writing your first line of code in Java!
Use variables in JShell
Printing output with the System.out.println() method
New commands in JShell, including /save, /open, and more!
Describe and design the concept for the random number guessing game
Run eclipse and get ready to start coding
Set up Eclipse with the right theme and font size for your monitor (and eyes)
Create your first new app project file in Eclipse
Accept keyboard input from the user in your programs.
Use Java to generate random numbers between 1 and 100.
Take input from the user and turn it into a variable you can use in your code.
Test and compare variables using the if statement in Java
Run the app to see your code at work!
Add a while loop to allow the user to play the game over and over again!
Run the game to test the app using the command line terminal.
Section 2 review
Common errors in Java and how to avoid them.
Explore Java by adding your own code to the Guessing Game app - count the number of times the user had to guess to get the right number.
Add a variable to count the number of guesses the user took to get the number, and let the user know how they did.
Build a graphical user interface version of the Java guessing game using Swing in Eclipse, transforming a console app into a desktop, event-driven window with a guess input and button.
Create a new java gui project in eclipse called guessing game and set up a main class in camel case that extends JFrame.
Learn to build a Java desktop GUI with a window frame using the Window Builder editor in Eclipse, dragging components, setting a label, and viewing auto-generated Java code.
Finish the graphical user interface for the guessing game by spacing elements evenly, bolding the title, and grouping controls into a panel with centered, aligned layout for different view sizes.
Name GUI elements in a Java window builder for easy code access, align components with center alignment and vertical spacing, and apply a consistent text field, button, and label naming convention.
Connect the graphical user interface to your Java code by declaring private text field and label at the class level, and use encapsulation as you wire the window builder layout.
Create a public void checkGuess method that reads the text field, parses input as an integer, compares it to the target number, and updates the output label.
Create a public void newGame method that sets a fresh random number between 1 and 100 in the class instance variable and wires it to the main application.
Set up and run the hi-lo guessing game by creating a guessing game object, calling its new game function, and sizing a 430 by 330 desktop GUI window.
Learn to handle user events in a Java desktop app by wiring a button click with an action listener, driving a check guess flow in Eclipse Window Builder.
Improve the desktop app user experience by adding an enter key action for the text field, wiring action listeners, and refining focus, select all behavior, and proper window closing.
Learn how to gracefully handle user input errors in Java by using try-catch-finally to parse integers, display helpful messages, and refocus and highlight input fields when invalid data is entered.
Implement a try counter for a 1–100 guessing game, aiming for seven tries or fewer, and enforce exactly seven tries with a loss if not guessed.
Learn to implement a Java guessing game by initializing seven tries, decrementing after each guess, displaying remaining attempts in the UI, and resetting to seven on a new game.
Build an Android guessing game app that lets users guess a number between 1 and 100 on mobile devices, using Java in Android Studio and testing with an emulator.
Open Android Studio, locate content_main under app resources layout, replace hello world with large text view titled 'Dr. Paine's guessing game', and add text fields and buttons in design view.
Design an Android guessing game ui by adding a prompt label, a number text field (edit text), a guess button, and a result label, centered with margins in Android Studio.
Rename GUI components with clear ids for easier Java integration in the guessing game. Set text field to 75 dp, adjust margins to 30 dp, and hide the fab button.
Connect Android user interface components to Java code by declaring private variables for edit text, button, and text view, then use findViewById and onCreate to wire them to the layout.
Add a new game method in Java to initialize a random number between 1 and 100, and update the catch to prompt 'Please enter a whole number' with refocused textfield.
Connect the guess button to its action by setting an on click listener in android studio, using an anonymous inner class to call the new game and handle the guess.
Set up an Android emulator and run your app on a virtual device using the Android Virtual Device Manager. Download a system image and push the app to test.
Discover how to run and test your app on a real Android device by enabling developer options, USB debugging, and connecting via USB.
Improve the user experience by centering text field content with center horizontal gravity, highlighting input, implementing on editor action listener, and enabling focus and select all for the guess flow.
practice adding a tries-left counter in a java app by declaring a variable and updating it on each guess. display the remaining attempts (starting at 7) in the output label.
Learn to implement a tries left counter in a Java Android app by initializing it to 7 by default, decrementing on each guess with --, and displaying remaining tries.
Explore encoding and decoding secret messages using the Caesar cipher in Java, manipulating strings and characters, and build a cross-platform app for command line, desktop GUI, and Android.
Build a command line secret messages app in Java that encodes or decodes using strings, includes a Caesar cipher rotation of 13, and uses a scanner for user input.
Learn how Java encodes and decodes messages by shifting character values using a secret key, exploring ASCII and Unicode codes, casting, and wrapping around for forward encoding.
Learn to implement a rot13 style caesar cipher in Java by shifting only alphabetic characters, wrapping at z, and preserving spaces and punctuation.
Encode and decode secret messages with a secret key, and add a while loop to process multiple messages until blank input, while checking digits 0 to 9.
Extend a Java message encoder with a while loop to repeatedly encode or decode user input until an empty line. Learn handling string and character values with scanner input.
Set up a desktop gui for a secret messages app with two text areas, a key field, encode/decode controls, and a key slider, reusing cli logic and window builder editor.
Design and name the gui for a secret messages app by laying out text areas, a key field, and an encode decode button in an absolute layout.
Create a Java encoding method that takes a message string and an integer key. It loops through the text, encodes alphabetic characters, and returns the encoded message for the GUI.
Wire the encode decode button to an action listener, read the message from text in and the key from text key, call the encode method, and display in text out.
Learn to design a GUI slider in Java, set min/max values and ticks, bind slider changes to a text field, and create an interactive cipher key for real-time encoding.
Use a slider to automatically encode and decode messages with a Caesar cipher, updating the key and output in real time and testing with copy and paste.
Learn to build an encoder that encodes digits 0–9 using modular arithmetic inside an encode method, turning a secret messages app into an effective encoder/decoder with a configurable key.
Learn how to encode digits 0-9 in a Java-based encoder using modular arithmetic, applying a numeric key, wrapping around at 10, and decoding with negative keys to reverse the process.
Set up the secret messages app GUI in android studio, creating an api 16+ project, add a title, multi-line text fields, a key input, a seek bar, and encode/decode button.
Review section 7's mobile secret message app by wiring a graphical user interface with multi-line text fields, a seek bar, and encode-decode flow.
Wire a button to encode and decode text with an on click listener, updating the text output and a seek bar for desktop and Android apps.
Build the bubble draw app in Java for command line, GUI, and Android, and learn array lists, timer animation, event listeners, and a Bubbles class on a Java canvas.
Set up a new bubble draw project in Eclipse, create a main class and a bubble panel using Java Swing, and configure a runnable frame to draw bubbles with mouse.
Set up a Java desktop app by creating a JFrame, configuring its title and default close operation, adding a bubble panel, packing, and displaying the window for animated bubbles.
Use a Java ArrayList to store each bubble's x, y, and size for rendering. Initialize the list in the bubble panel constructor and set a black 600 by 400 panel.
Override the paintComponent method in a JPanel to render bubbles from the bubbleList on the Java canvas, then draw the count using bubbleList.size in green text.
Implement a named bubble listener to handle mouse events, add bubbles at click locations with a fixed size, and repaint the panel to display yellow bubbles.
Learn to draw bubbles with the mouse in Java, center each dot with an offset, and enable dragging via a mouse motion listener that updates coordinates and repaints.
Learn to animate bubbles in a Java Swing desktop app by using a timer, updating each bubble's position, and repainting at about 30 frames per second to create motion.
Develop wind-blown bubbles by assigning each bubble a random x and y speed up to a max, updating positions every frame to produce varied directions, speeds, and sizes.
Implement collision detection to bounce bubbles off screen edges by reversing the x and y speeds when hitting walls, using the panel's width and height to bound motion.
Review the bubble panel animation and array list data structure, with a timer-driven update for bouncing bubbles. Tackle two programming challenges to enhance the drawing app and explore mouse interactions.
In the bubble class constructor, if both the x and y speeds are zero, reset them to 1 so every bubble moves and no dot stays still.
Introduce a more interactive GUI for the bubble draw app, enabling dot size input, 60 fps animation, and controls like update, clear, and grouping with transparency.
Set up the bubble draw gooey app by creating a new project, importing the existing code, and enabling transparency with a four-value color constructor to render translucent bubbles.
Set up the graphical user interface with window builder, adding a bubble panel, labels, text fields for dot size and animation speed, and update and clear buttons.
Add a clear button action listener to empty the bubble list and repaint, and an update action to read size and speed from text fields and adjust the timer.
Add a group bubbles checkbox to the UI to make bubbles share the same speed when dragged, allowing them to move together and form cohesive shapes.
Review graphical user interface concepts by examining a panel with flow and absolute layouts, adding labels, text fields, buttons, and checkboxes, and controlling animated bubbles with a timer and repaint.
Add a pause checkbox to control the bubble drawing animation by wiring an action performed handler that stops or restarts the timer.
Learn to implement a hard bounce by refining collision detection in the bubble draw app, using bubble center coordinates and half-diameter to detect edges and keep bubbles on screen.
Learn to build the multi-touch bubble draw app in Android Studio, creating a bubble view from image view, using a linear layout, and animating with threads on API 21+.
Set up variables, a private array list of bubbles, and a constructor in the bubble view, then use a thread and handler to animate bubbles with paint on Android.
Reuse the bubble class from the desktop app to power an Android bubble view, using a runnable thread, array list of bubbles, and argb color handling in onDraw for animation.
Draw bubbles on Android using onDraw to render a bubble list with x, y, size, color, and speed, via canvas drawOval and paint.
Copy the draw loop to the constructor to set up 100 bubbles and test their animation on the canvas.
Learn to draw with touch in an Android app by implementing an on touch listener, handling motion events, and spawning bubbles at touch points with sizes 50–100.
Review the multi-touch bubble draw mobile app, compare with the desktop version, and learn to adjust speed, bubble size, and app title through strings and on-device testing.
Add a live bubble counter by drawing white text in the upper-left corner that shows the current number of bubbles, just before the next frame is queued at 60 fps.
Learn to handle multi-touch drawing of bubbles: with multiple fingers bubbles scatter freely, while a single finger groups new bubbles to follow the previous one by speed.
Learn to program in Java by building awesome, interactive desktop & mobile apps!
Start coding in Java step-by-step with Computer Science Professor Dr. Bryson Payne, author of the Amazon #1 New Release and Top 10 Best Seller, Teach Your Kids to Code (now published in six languages)!
This course, based on Payne's second book, Learn Java the Easy Way, will have you coding Java and Android apps TODAY! In this course, you'll learn to:
Quickly test code snippets in the new Java JShell interactive shell!
Build Java desktop apps, both text-based and GUI!
Create Android mobile apps, using Java, for Android phones and tablets.
Program a colorful, animated, multi-touch drawing app (and two other apps) on your Android phone or tablet by the end of the course!
Design and code playable games and apps starting from scratch, and share them with your friends, or with the world!
Learn important programming concepts like variables, loops, functions and object-oriented programming while having fun along the way!
You can learn the #1 Programming Language in the World!
Over 15 Billion Devices run Java, from PC/Mac/Linux to Android devices to TVs, watches, cars, Blu-ray players and more! Learn Java the Easy Way brings the power of Java and Android programming into your hands, with easy-to-follow videos, crystal-clear audio, and line-by-line code explanations as you build fun, playable apps that you can share!
Everything you need to get started right away
Complete with working code downloads and high-definition videos, you'll be able to work alongside a professor with 20+ years' teaching and over 30 years' programming experience. You'll also receive a Certificate of Completion upon finishing the course!
New: Programming Challenge Solutions added to all 10 sections!
No Risk: Preview videos from Sections 1, 2, and 4 now for FREE, and enjoy a 30-day money-back guarantee when you enroll - zero risk, unlimited payoff!
Enroll now and get started coding in Java + Android today!