Northstar Learning › Coding course
Learn Java by doing
300 quests · types, loops, methods, collections and exceptions
300 questions · free · no account needed · works offline once loaded
Start learningTry today’s daily challengeWhat you will cover
- Integer arithmetic
- String concatenation
- Integer division
- Comparison and logic
- Conditional branches
- For loops
- Methods and return
- Array indexes
- Array totals
- String length
- Substring boundaries
- ArrayList operations
- Maps and defaults
- Value equality
- Remainders
- Repair a boundary
- Repair a return
- Repair string comparison
- Choose a type
- Exceptions and parsing
Try some questions
Tap a question to see the answer and why.
What does this program print?
public class Main {
public static void main(String[] args) {
int adults = 3;
int kids = 2;
int price = 8;
System.out.println((adults + kids) * price);
}
}
Options: 19 · Compilation error · 8 · 40
Answer: 40
It prints: 40. Brackets run first. Add the people together, then multiply by the price.
Play with friends
Northstar also has a group quiz: host a live room, run one on a single screen, or send a friend a challenge link.
Open the group quiz