Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Day 01 - Java Basics and Setup

📚 What You'll Learn Today

  • Understanding what Java is and its history
  • Setting up your Java development environment
  • Writing your first Java program
  • Understanding the basic structure of a Java program
  • Running Java programs from command line

🎯 Key Concepts

What is Java?

Java is a high-level, object-oriented programming language that runs on billions of devices. It's known for its "Write Once, Run Anywhere" capability.

Java Program Structure

Every Java program has these essential components:

  • Class declaration: public class ClassName
  • Main method: Entry point of the program
  • Statements: Instructions that perform actions

Basic Syntax Rules

  • Java is case-sensitive
  • Statements end with semicolons (;)
  • Code blocks are enclosed in curly braces {}
  • File name must match the public class name

📁 Files in This Day

  1. HelloWorld.java - Your first Java program
  2. BasicStructure.java - Understanding Java program structure
  3. Comments.java - Different types of comments in Java

🚀 How to Run

  1. Open command prompt/terminal
  2. Navigate to this folder
  3. Compile: javac HelloWorld.java
  4. Run: java HelloWorld

💡 Exercises

  1. Modify the HelloWorld program to print your name
  2. Create a program that prints multiple lines
  3. Experiment with different comment types

🔍 Common Issues

  • 'javac' is not recognized: Make sure Java is installed and PATH is set
  • File not found: Ensure you're in the correct directory
  • Compilation errors: Check for typos and missing semicolons

📖 Additional Resources


Next Day: Day 02 - Variables and Data Types