Kotlinlearncs.online LogoJava

Lessons

learncs.online lessons mix text, interactive walkthroughs, video content, and small practice and homework problems.

Each one brings you one step closer to mastering the basics of computer science and programming.

Lessons

0: Hello, world!

Kotlin
Java

Welcome to learncs.online! We're excited to join you as you start your journey in computer science and programming. Today!

1: Variables and Types

Kotlin
Java

Let's begin our journey in computer science by presenting two of the basic building blocks of computer programs: variables and data types.

2: Operations on Variables

Kotlin
Java

Our journey continues as we examine how we can manipulate the data stored by variables in our programs.

3: Conditional Expressions and Statements

Kotlin
Java

One of the things that makes computers so powerful is their ability to make decisions. We'll explore that capability in our programs in this lesson.

4: Compound Conditionals

Kotlin
Java

Next we'll examine how to make our conditional statements a bit more complex, allowing us to make more interesting decisions based on data in our programs.

5: Arrays

Kotlin
Java

Let's learn about our first data structure: arrays, which put data values in order.

6: Loops

Kotlin
Java

This lesson covers our last core computer capability: the ability to repeat something multiple times, very quickly.

7: Algorithms I

Kotlin
Java

Now we'll pull together everything we've learned so far and use our new skills to start solving real problems. Or, put another way, we'll start designing algorithms.

8: Practice with Loops and Algorithms

Kotlin
Java

Let's pause for more practice with loops and algorithms, including several chances to get practice solving real problems.

9: Functions

Kotlin
Java

As we begin writing algorithms, let's stop and discuss how to organize our code into reusable units called functions.

10: Errors and Debugging

Kotlin
Java

Let's examine errors, debugging, and maintaining a healthy mindset as you learn to work with computers.

11: More About Functions

Kotlin
Java

Next we'll continue discussing functions and introduce several common algorithm patterns.

12: Practice with Functions

Kotlin
Java

Let's pause for a bit more practice with functions before we continue our journey together.

13: Functions and Algorithms

Kotlin
Java

In this lesson we'll explore the connections between functions and algorithms.

14: Strings

Kotlin
Java

Let's meet a new type of data and our first example of an object.

15: Algorithms and Strings

Kotlin
Java

This lesson is on algorithms and strings, and gives us a bit more practice with both.

16: null

Kotlin
Java

How many problems can nothing cause? Quite a few! We'll learn more about the nothing that is a huge problem in this lesson.

17: Practice with Strings

Kotlin
Java

Let's reinforce what we know about strings by working with a few more problems together!

18: Multidimensional Arrays

Kotlin
Java

Our next lesson expands our ability to work with sequential data into multiple dimensions!

19: Imports and Libraries

Kotlin
Java

This lesson may be the most important of the entire course, since it shows you how to use other people's code!

20: Lists and Type Parameters

Kotlin
Java

Next we'll learn how to use lists, a linear data structure but one that is a bit more useful than the arrays that we've been working with so far.

21: Maps and Sets

Kotlin
Java

Let's look at two more very useful collections: maps and sets.

22: Practice with Collections

Kotlin
Java

Let's get a bit more practice with collections, those basic data structures that are so useful.


23

Compilation and Immutability

Kotlin

Let's explore a bit of programming internals, specifically your code is tranformed before it is executed in a process known as compilation.

Compilation and Type Inference

Java

Let's explore a bit of programming internals, specifically your code is tranformed before it is executed in a process known as compilation.


24: Introduction to Objects

Kotlin
Java

This lesson begins a new topic: objects.

25: Objects, Continued

Kotlin
Java

Let's continue our discussion of objects by examining object methods.

26: Constructors

Kotlin
Java

Our next lesson examines what happens when objects are created.

27: Encapsulation

Kotlin
Java

Next we'll investigate how to enable encapsulation through visibility modifiers and setters and getters.


28

Companion Objects

Kotlin

Next we'll continue understanding Kotlin objects by exploring companion objects.

Static

Java

Next we'll continue understanding Java objects by exploring the static keyword and its implications.


29: Data Modeling 1

Kotlin
Java

This lesson puts our new abilities with objects to use modeling a real-world system.

30: Inheritance

Kotlin
Java

Our next lesson explores the relationships between classes established through inheritance.

31: Polymorphism

Kotlin
Java

This lesson introduces a big new word and a big new idea: polymorphism.

32: Equality and Object Copying

Kotlin
Java

What does it mean for two objects to be equal? And how do we copy them? In this lesson we'll find out.

33: Data Modeling 2

Kotlin
Java

Next we'll complete another data modeling exercise that pulls together everything that we've learned.

34: References

Kotlin
Java

Our focus in this lesson is on references, both generally and specifically.

35: References and Polymorphism

Kotlin
Java

Let's combine what we know about polymorphism and references to deepen our understanding even further.

36: Catching Exceptions

Kotlin
Java

Next we'll begin learning how to work with exceptions by understanding how to handle them when they occur.

37: Throwing Exceptions

Kotlin
Java

Let's continue to learn about exceptions by finding out how and when to generate our own errors.

38: Working with Exceptions

Kotlin
Java

This lesson continues our practice with exceptions.

39: Using Interfaces

Kotlin
Java

Let's take the first step to understanding interfaces.

40: Implementing Interfaces

Kotlin
Java

Next we'll examine how to implement interfaces on our own classes.

41: Practice with Interfaces

Kotlin
Java

This lesson continues our practice with interfaces.

42: Anonymous Classes

Kotlin
Java

Let's dive in to the world of anonymous classes.

43: Lambda Expressions

Kotlin
Java

This lesson explores lambda expressions, a terse way of implementing interfaces using anonymous classes.

44: Algorithms and Lists

Kotlin
Java

Our next lesson starts the third half of the class, our exploration of data structures, algorithms, and algorithm analysis.

45: Linked Lists

Kotlin
Java

Now for a different take on lists, we'll examine lists that store the position of items using reference linking.

46: Lists Review and Performance

Kotlin
Java

This lesson continues discussing linked lists and implement a few list methods together.

47: Recursion

Kotlin
Java

This lesson introduces recursion, a powerful new problem-solving strategy.

48: Trees

Kotlin
Java

Next we'll introduce trees, which are both a commonly-used data structure and a great way to get practice with recursion.

49: Trees and Recursion

Kotlin
Java

Let's continue practicing with trees and recursion!

50: Practice with Recursion

Kotlin
Java

Let's get some additional practice with trees and recursion!

51: Sorting Algorithms

Kotlin
Java

This lesson begins our examination of sorting algorithms, which represent both a conceptual and an implementation challenge.

52: Merge Sort

Kotlin
Java

We'll continue in this lesson by examining Merge Sort, an interesting and efficient sorting algorithm.

53: Quicksort

Kotlin
Java

Next we'll continue on to examine Quicksort, a new sorting algorithm with some very interesting characteristics. Then we'll review the sorting algorithms that we've learned together.

54: Binary Search

Kotlin
Java

Let's apply some of the same ideas we've developing sorting to a new problem, search.

55: Hashing

Kotlin
Java

This lesson explores hashing, a mysterious and yet incredibly useful idea that is even included directly in our programming language!

56: Implementing a Map

Kotlin
Java

This lesson is short and fun. Let's combine what we know about hashing, arrays, and linked lists to implement our own map.

57: Generics

Kotlin
Java

Next we introduce a language feature that allows us to write both general and type-safe code.


58

map-reduce-filter

Kotlin

This lesson explores map-reduce-filter collection processing patterns, which are well-supported by Kotlin and useful for performing transformations on data.

Streams

Java

This lesson explores streams, an advanced programming pattern useful for performing transformations on data.


59: Graphs

Kotlin
Java

In this lesson we'll introduce graphs, another commonly-used data structure and another great way to practice with recursion.

60: Graph Algorithms

Kotlin
Java

Let's continue our exploration of graphs by exploring algorithms that operate on them.