Day+2+-+Java+Basics
Day+2+-+Java+Basics
Rules:
1. Start with a letter, $, or _.
2. Casesensitive.
3. No spaces or special characters.
4. No Java keywords.
Variable Naming
Importance: Clear and consistent variable names
make code easier to read and understand.
Rules:
1. Start with a letter, $, or _.
2. Casesensitive.
3. No spaces or special characters.
4. No Java keywords.
Best Practices:
1. Be descriptive.
2. Use camelCase.
3. Keep it short and readable.
Variable Naming
Importance: Clear and consistent variable names
make code easier to read and understand.
Rules:
1. Start with a letter, $, or _.
2. Casesensitive.
3. No spaces or special characters.
4. No Java keywords.
Best Practices:
1. Be descriptive.
2. Use camelCase.
3. Keep it short and readable.
Common Mistakes:
1. Starting with a number.
2. Using spaces.
3. Using special characters (except $ and _).
Data Types
What are Data Types?: Data types classify different types
of information and define the operations that can be
performed on that data. 3
Data Types
What are Data Types?: Data types classify different types
of information and define the operations that can be
performed on that data. 3