Type Systems

Learn to deal with different types of programming languages.

Dealing with different languages

When we refer to something like 42 in code, is that a number, a string, or what? If you have a function like factorial(n), what kind of thing is supposed to go into it, and what’s supposed to come out? The type of elements, functions, and expressions is essential. How a language deals with types is called its type system.

The type system can be an important tool for writing correct programs. For example, in Java, we could write a method like this:

Get hands-on with 1400+ tech skills courses.