00:00 - What is `static` in Java and what is it used for?
00:27 - Static variables: a practical example with a counter
01:31 - Why is the value shared between objects?
02:11 - Static vs. instance variables: key differences
02:52 - Static methods: how to call them without creating objects
03:40 - Limitation: why you can't use `this` in `static`
04:31 - `static` blocks: initializing code before `main`
05:00 - Summary, pros/cons, and best practices
⚡️ From Developer to Senior Architect - https://www.codeja.dev/bootcamp
👨💻 CodeJa | Learn JAVA with EXERCISES - https://codeja.dev/
🎁 FREE SPRING BOOT COURSE - https://www.codeja.dev/courses/curso-...
🎁 FREE JAVA COURSE - https://www.codeja.dev/courses/curso-...
📱 TikTok: / programandoenjava
💬 Discord: / discord
💬 Instagram: / programandoenjava
🐦 Twitter / X: / programandojava
💼 LinkedIn: / ricardoromerobenitez
📩 JAVA NEWSLETTER WEEKLY - https://programandoenjava.substack.co...
Music used:
A Magical Journey Through Space by Leonell Cassio | / leonellcassio
Music promoted by https://www.free-stock-music.com
Creative Commons Attribution-ShareAlike 3.0 Unported
https://creativecommons.org/licenses/...
Video Chapters:
00:00 - What is static in Java and what is it used for?
00:27 - Static variables: a practical example with a counter
01:31 - Why is the value shared between objects?
02:11 - Static vs. Instance Variables: Key Differences
02:52 - Static Methods: How to Call Them Without Creating Objects
03:40 - Limitation: Why You Can't Use `this` in `static`
04:31 - `static` Blocks: Initializing Code Before `main`
05:00 - Summary, Pros/Cons, and Best Practices
Title: The STATIC Keyword: How to Use It? - Java Course