basics
67 tutorials tagged “basics”.
- Where Java Is UsedWhere Java is used in the real world, from UPI and banking servers to Android apps and big data, and the jobs that use it.
- Array LengthFind how many elements an array holds with length, why it's a field and not a method, the last valid index, empty arrays, and length vs length() vs size().
- Java Break StatementLeave a loop or a switch early with break: stopping a search when you find what you need, break inside switch, and how break behaves in nested loops.
- Command Line ArgumentsPass values to a program when you start it: how the command line becomes args, quoting values with spaces, converting and checking them.
- Common Beginner Compile ErrorsHow to read a javac error message, and how to fix the eight compile errors every beginner meets, from ';' expected to missing return statement.
- Compact Source Files and Instance Main MethodsJava 25 lets you write a program as just void main() { ... } with the IO class for input and output. What it removes, what it adds, and when to use it.
- Java Continue StatementSkip the rest of one loop round with continue: filtering items, how continue behaves in for, while and do-while loops, and when an if-else reads better.
- Control Statements in JavaAn overview of how Java decides what to run next: decision statements (if, switch), loops (for, while, do-while) and jump statements (break, continue, return).
- Difference Between C++ and JavaHow Java differs from C++ in compilation, memory management, pointers, inheritance and typical uses, with side-by-side code.
- Default Values of Data TypesWhich variables Java fills with default values (fields and array elements), what those defaults are for each type, and why local variables get none.