The labs on this site need JavaScript to run. The same content is written out below.
Dev Learning Lab
Pick a question, click Run, and watch how each concept behaves.
A free lab for learning Java, Spring, JPA, database, networking, and security concepts by picking a question and running it
Before looking at how a concept behaves in detail, these labs show what the concept looks like in code and what happens without it.
Java
- Variables and types — What is a variable, and what does a type decide?
- Methods — What is a method, and how is declaring it different from calling it?
- Classes and objects — How is a class different from an object?
- References — What does it mean to store an object in a variable?
- null — What is null, and why does NullPointerException happen?
- Constructors — What is a constructor, and when does it run?
- static — What is static, and what changes when you add it?
- Inheritance — What does a class inherit through extends?
- Interfaces — What does an interface look like in code, and what does it decide?
- Exceptions — What is an exception, and what does try-catch do?
- Generics — What does the <String> in List<String> do?
- List and Map — What do List and Map hold, and how do you get things out?
- Lambdas — What is a lambda a shorter way to write?
- Streams — What is a stream, and how is it different from a for loop?
- Annotations — What is an annotation, and what happens when you add one?
- Threads — What is a thread, and what does start() do?
- Locks (synchronized) — What is a lock, and what happens without one?
- Thread pools — What is a thread pool, and how is it different from creating a thread every time?
- Compilation and the JVM — How does Java code run?
- File I/O — What do you exchange when you write to and read from a file?
- Libraries and dependencies — What is a library, and what happens when it is missing?
Spring
- Beans — What is a bean, and how does it differ from an object you just created?
- Dependency injection — What does dependency injection do for you?
- AOP and proxies — What is a proxy, and how does Spring step in before and after my method?
- Servlets — Which class is called a servlet?
- Controllers — Which class is called a controller?
- Configuration files — What is a configuration file, and how is it different from writing values in the code?
- JDBC — How does Java code send SQL to the database?
- @Transactional — What does @Transactional group together?
- Spring Boot — What does Spring Boot do for you?
- Test code — What is test code, and who decides whether a test passes or fails?
JPA
- Entities — What is an entity, and how does it differ from an ordinary class?
- Persistence context — What is a persistence context, and what does it do for you?
- Repositories — What is a repository, and who creates the implementation?
- Associations — What is an association, and what does @ManyToOne do for you?
- Lazy fetching — When is an associated object read from the database?
- JPQL — What is JPQL, and how is it different from SQL?
Database
- Tables, rows, and columns — What does a table look like, and what are rows and columns?
- Primary keys — What is a primary key, and what changes without one?
- Foreign keys — What is a foreign key, and what changes without one?
- WHERE — What does WHERE decide, and what happens without it?
- Joins — What does a join attach, and what does ON decide?
- GROUP BY and aggregation — What does GROUP BY group, and what do COUNT and SUM count?
- Indexes — What is an index, and what changes when there is none?
- Transactions — What does a transaction group together, and what do COMMIT and ROLLBACK do?
- Row locks — What happens when two transactions try to change the same row?
- Storage and durability — Does committed data stay after the server is turned off?
Networking
- IP addresses and ports — What do an IP address and a port each point to?
- TCP connections — What does it mean to open a connection, and what happens if you send without one?
- URLs — What parts is a URL made of?
- DNS — What does DNS turn a name into?
- HTTP requests — What does an HTTP request look like as text?
- HTTP methods — How is GET different from POST?
- HTTP responses — What does an HTTP response look like as text?
- Cookies — What is a cookie, and who stores it and who sends it?
- JSON — What does JSON look like, and what mistakes make it unreadable?
- HTTPS — How is HTTPS different from HTTP?
- Proxy servers — What is a proxy server, and what changes when it sits in between?
Security
- Authentication and authorization — How are authentication and authorization different?
- Sessions — What is a session, and where is the logged-in state remembered?
- Tokens — What is a token, and what does the server look at to trust it?
- Hashing — What is a hash, and why do we store passwords as hashes?
- Encryption — What is encryption, and what happens without the key?
- Origins — What is an origin, and why does the browser tell different origins apart?
- Input and injection — What happens when text typed by a user is read as code?
Architecture and operations
- Processes — What is a process, and what is separate when you run a program twice?
- Calling another server — How is a server calling another server different from calling a method?
- Load balancers — If you run several servers, which server does a request go to?
- Caches — What is a cache, and what do you gain and lose by using one?
- Message queues — What is a message queue, and how is it different from calling a server directly?
- Deployment — When does a running server change after you edit the code?
- Git commits and branches — What is a commit, and what does a branch point to?
From syntax to object-oriented programming, collections, threads, and the JVM. See what happens inside when code runs.
Basic syntax
Classes and objects
Commonly used classes
- == and equals — Why is == false when the values are the same?
- equals and hashCode — Why can HashMap not find the key when you override only equals?
- String, StringBuilder — Why is the original unchanged after you call a string method?
- Dates and times — What date do you get when you add one month to January 31?
- Optional — Why does the default-value code in orElse run even when a value is present?
Exceptions
Generics, enums, and annotations
- Generics — What does the <Integer> in List<Integer> protect you from?
- Enum classes — Why does an enum saved as a number come back as a different constant?
- Annotations — What really happens when you just add an annotation with @?
Collections
Lambdas and streams
Threads and concurrency
JVM
I/O
The container and dependency injection, AOP and transactions, the path a web request takes, and what Spring Boot does for you.
IoC container and DI
AOP and proxies
Data access and transactions
Web MVC
Spring Boot
Other features
What it means to store objects in tables: the persistence context, relationships, lazy loading, and when and how many queries are sent.
Getting started
- What JPA solves — When you write the SQL yourself, what do you have to fill in by hand?
Persistence context
Entity mapping
Relationships
Proxies and fetching
- Proxies and lazy fetching — Is an object received through lazy fetching a real entity?
- N+1 — Why are many queries sent when you load the order list only once?
Queries
Web applications and performance
Table design and SQL, indexes and execution plans, transactions and locking, replication and distribution. See how data is stored and read.
Relational model and design
SQL
Indexes and execution plans
Transactions and locking
Storage and recovery
Scaling and distribution
From typing an address to receiving the response: DNS, TCP, HTTP, TLS, and the machines in between.
The big picture
Addresses and names
- URL structure — After I added the search term "A&B" to the URL, the server received only "A"
- DNS — Who knows the IP address of a domain name, and when does a change show up?
- IP addresses and subnets — Are two IP addresses with the same first three numbers on the same network?
- Switches and routers — If the destination IP is the server, why is the frame sent to the router's MAC address?
Transport layer
HTTP
Secure connections
In front of the web server
Authentication (who you are), authorization (what you are allowed to do), web attacks and defenses, and cryptography.
Authentication
Authorization
- Security filter chain — Where is it decided whether the response is 401 or 403?
- Access control — If a logged-in user only changes the number in the URL, can they see someone else's order?
- Method security — When does an authorization check on a method run, and when is it skipped?
Web attacks and defenses
Cryptography
Topics for when traffic grows, when a system is split into services, and when you deploy and monitor it.
High traffic
Messaging and asynchronous processing
Splitting into services
Deployment and operations
Observability
Collaboration