Week 1: Java Basics Welcome to the repository for Week 1 of our Java learning journey. This week focused on building a strong foundation in the fundamental concepts of Java programming.
Table of Contents ● Overview ● Topics Covered ○ Day 1: Introduction to Java ○ Day 2: Variables, Data Types, and Operators ○ Day 3: Control Flow (Conditional Statements and Loops) ○ Day 4: Arrays ○ Day 5: Strings ○ Day 6: Functions (Methods) ● Prerequisites ● How to Use This Repository ● Next Steps
Overview The first week was dedicated to understanding the core syntax and essential building blocks of the Java programming language. We covered how to write simple Java programs, handle different types of data, control the flow of execution, and work with fundamental data structures like arrays and strings, as well as modularizing code with functions (methods).
Topics Covered
Day 1: Introduction to Java ● What is Java? ● History and importance of Java ● Setting up the Java Development Kit (JDK) ● Writing and running the first Java program ("Hello, World!") ● Understanding the basic structure of a Java program (classes, main method)
Day 2: Variables, Data Types, and Operators ● Declaring and initializing variables ● Primitive data types (int, double, boolean, char, etc.) ● Non-primitive data types (String - introduced briefly) ● Understanding Java operators (arithmetic, relational, logical, assignment) ● Type casting
Day 3: Control Flow (Conditional Statements and Loops) ● if, else if, and else statements ● switch statement ● for loops ● while loops ● do-while loops ● break and continue statements
Day 4: Arrays ● What are arrays? ● Declaring and initializing arrays ● Accessing array elements ● Iterating through arrays ● Multi-dimensional arrays
Day 5: Strings ● Introduction to the String class ● Creating String objects ● Common String methods (e.g., length(), charAt(), substring(), equals(), equalsIgnoreCase()) ● String concatenation ● String immutability
Day 6: Functions (Methods) ● What are functions/methods? ● Defining and calling methods ● Method parameters and return types ● Method overloading ● Understanding static and void keywords
Prerequisites ● A computer with a supported operating system (Windows, macOS, Linux). ● Java Development Kit (JDK) installed. ● A code editor or Integrated Development Environment (IDE) like VS Code, IntelliJ IDEA, or Eclipse.
How to Use This Repository This repository is structured to reflect the topics covered each day. You can find code examples, notes, or exercises within the respective daily folders (if available). Feel free to explore the code, run it, and modify it to deepen your understanding.