Learning Java Programming
Overview
About
Trailer
01: Welcome to Java!
Discover what makes Java one of the most popular programming languages out there. After an overview of how Java works, learn the meanings and applications of terms like Java Virtual Machine, integrated development environment, and Java bytecode.
02: Choose an Integrated Development Environment
Think of integrated development environments (IDEs) as code editors with everything programmers need to write code. Get insights into three IDEs: IntelliJ IDEA (used to write programs in multiple languages), NetBeans (which simplifies app development), and Android Studio (the app-friendly IDE used in rest of this course).
03: Installing Android Studio for Mac
For Mac users: Discover how to properly install Android Studio—the tool you’ll be using to learn Java and, later in the course, build an Android app. This lesson covers the step-by-step installation process.
04: Installing Android Studio for Windows
For Windows users: Discover how to properly install Android Studio, the tool you’ll be using to learn Java and, later in the course, build an Android app. This lesson covers the step-by-step installation process.
05: Create Your First Java Program!
Crack your knuckles and get ready to create your first Java program inside Android Studio. Learn how to build a program that prints out specific messages: “Hello World” and “Java programming is fun!”
06: Java Code Structure, Syntax, and main Method
Take a closer look at the "print" program you created in the previous lesson. Topics you’ll cover here include package keywords, classes (which must go within a pair of curly braces), and the critical importance of basic syntax for your code to run properly.
07: Declaring Variable Types: int and String
Variables are essential in computer programming because they make it much easier for programmers to output data that can be passed on to another method for further processing. Learn how to declare and specify String and int (integer) variables.
08: Concatenating Variables in Java
The act of putting strings together into one long string is known as concatenation. Exercises in this lesson include creating several String and int variables with assigned values, and writing a short story about yourself using variables in Java.
09: Primitive Variable Types: boolean and char
There are eight primitive variable types in Java, each of which has a set number of data bits it can hold. Dichone introduces you to the boolean primitive, which can only hold either 1 or 0 (true or false), and the char primitive, which represents one character only.
10: Primitive Variable Types: byte, short, and long
Explore additional primitive variable types. A byte holds eight bits and is commonly used in instances where you need a small container for data. A short holds 16 bits, and makes a great mid-sized container. And a long, at 64 bits, is best for larger numbers.
11: Primitive Variable Types: float and double
So far, you’ve learned how to express whole numbers of varying sizes. What about decimal numbers? That’s where a float or double comes in. The first holds any number with a few decimal places, and the second is best used to express decimals with more precision.
12: Java Operators and Operator Precedence
Understanding how operator precedence works in Java is crucial, because you could end up with the wrong result—even though you’ve plugged in the right numbers. Learn how to effectively work with mathematical operators like + and * and / and %.
13: The while Loop in Java
Loops help programs repeat tasks until a final condition is met. Here, learn how to build and use while loops in your program and get tips on avoiding the danger of creating an infinite loop that will run forever (or at least until your computer runs out of memory).
14: Java Branching Statements: if, if-else, and else-if
“If you have less than $1,000 in your bank account, you should not go to Las Vegas.” How do we express this statement in code? Learn how to branch programs using if, if-else, and else-if statements to evaluate conditional expressions and decide what to run.
15: Multiple Branches with the Java switch Statement
In programming cases where you have more than two possible conditions, a switch statement is your best friend, as it can test for a variety of different conditions and respond accordingly. In this lesson, try your hand at using switch statements.
16: The do-while Loop and the for Loop in Java
Gain working familiarity with do-while and for loops. With the former, the statements inside the loop are executed at least once (even if the loop condition is false). With the latter, you can repeat a section of a program a fixed number of times.
17: Arrays in Java
Unlike variables, arrays store a collection of related variables that share the same type. Here, learn to think of arrays in Java as containers that hold smaller containers inside them and get tips on how to master their flexibility in programming.
18: Creating Objects in Java
In programming, objects are the building blocks of tasks that you can plug into a bigger system. Explore the various components that go into creating objects, from creating a blueprint (class) to using "methods" to express particular object “behaviors.”
19: Class Constructors in Java
Constructors are methods that construct your object so that, when it’s instantiated, the object is not just empty and useless. In this lesson, take a closer look at how to work with constructors using the same code from the previous lesson.
20: Methods: Passing Arguments, Returning Values
In this lesson on methods (code blocks where you can have statements and in which you can write your logic), learn through several helpful exercises how to work with important method-related keywords like main, public, static, and void.
21: Java Getters and Setters
How can you protect your classes from catastrophic programming mistakes? How do getters and setters actually force you to set up your class properties in more secure ways? Should getters and setters be marked private or public? Find out here.
22: Using the String Class as a Reference Type
String, just one of the thousands of classes that come prepacked in Java, is a class you can instantiate into an object. In this lesson, explore some of the many nuances of using the String class as a reference type in your own coding work.
23: Java Inheritance: Overriding Parent Methods
Inheritance in Java involves the creation of a hierarchy of classes that inherit the behaviors of other classes. Discover how to override behaviors of the parent class (the super class) so that your subclass implements its own version of that behavior.
24: Java Inheritance: Invoking Parent Methods
What happens when you still want to invoke your superclass’s method inside of a subclass?Dichone teaches you how to do just that in this second lesson on Java inheritance that’s all about the power of the super keyword.
25: The Java Class Library
Comb through all the Java classes available to you as a programmer with this look at the Java Class Library. One of the many beauties of Java is this library of usable classes you can plug into your own classes, without having to write them yourself.
26: Java ArrayList and Object-Oriented Pros and Cons
So far, you’ve learned about three useful places to keep information: basic data types, arrays, and string objects. Now, turn to ArrayList: a data structure that holds objects of the same class and which can grow (or shrink) in size at any time.
27: Java Swing: Create a Simple User Interface
Creating programs with user interfaces in Java requires Java Swing and a set of classes called the Abstract Window Toolkit. In this lesson, discover just how easy it is to create user interfaces with these helpful tools.
28: Adding Buttons and Event Listeners
In Java Swing, whenever you want to have components react to a click event on a button, you need to attach those components to an ActionListener, then pass the ActionListener object. Learn how to do all that right here.
29: Java Swing: BorderLayout
When creating user interfaces (UI) in Java Swing, laying out what you want your users to see is very important. In such cases, you’d want to use the many helpful capabilities of the layout-manager class known as BorderLayout, which is the topic of this lesson.
30: Java Swing: FlowLayout
With FlowLayout, as you add components, they’ll be aligned horizontally (in a row) if the frame length is small; then FlowLayout will create more rows to accommodate the placement of the components. Take a look at how this works in the code.
31: Java Swing: BoxLayout
A BoxLayout is a layout manager that either stacks components on top of each other or places them in a row. In this lesson, learn how to use your programming skills to create a BoxLayout so you can see how all of this works.
32: Java Swing: Build a Fun Graphical User Interface
Time to bring your Java Swing skills to life onscreen. Here, build a fun Java Swing graphical user interface (GUI) application. You’ll draw a circle in the middle of a frame, and each time you click anywhere on the frame, the circle will change color randomly.
33: Android Studio: Setup, Emulator, and First App
In the first of several more lengthy, in-depth lessons on building your very own Android app, learn how to work with project templates, how to choose the right set of libraries and functionalities, how to set up emulators that can test your apps as you develop them, and more.
34: Android Project Structure
An Android app project is structured to separate the user interface (UI) from the logic (Java code). This structure makes creating Android apps much easier for the developer. Here, take a close look at both structural sides of your Android project.
35: Android EditText and the strings.xml File
Mobile apps are interactive. Users want to be able to add data and have the app do what it needs to do and then output some results. See how to enable users to add input to your app so, when a button is clicked, the app will show what they’ve entered.
36: Build an Inspiring Android App
Learn how to create an app that randomly shows an inspirational quotation onscreen when the user clicks a button. By the end of this concluding lesson, you’ll have built a simple yet fun Android application from scratch, with tips for how you can then enhance it in your own unique ways.