<aside>
☕
L1.2 — Variables and Methods covers Java variables and methods, the fundamental differences between primitives and objects, variable naming conventions, scope rules, and method definition/overloading.
</aside>
📋 At a Glance
- [ ] Review Java variable naming conventions (case sensitivity, allowed characters)
- [ ] Understand the difference between primitives and objects
- [ ] Practice declaring and initializing variables with proper data types
- [ ] Learn the 8 primitive types and their default values
- [ ] Master object references vs primitive values
- [ ] Understand member variables vs local variables (scope)
- [ ] Practice method definition syntax with all required components
- [ ] Understand pass-by-value (primitives) vs pass-by-reference (objects)
- [ ] Learn method overloading rules and signatures
- [ ] Practice using
System.out.println() and string concatenation
1. Java Variable Naming Rules
Java follows strict naming conventions that are case sensitive:
✅ Allowed:
- Letters, underscore (_), and dollar sign ($)
- Can contain numbers (but not as first character)
- Should start with lowercase for variables and methods