This repository contains basic Java practice programs that I wrote to understand fundamental programming concepts such as variables, loops, arrays, classes, objects, and constructors. These programs helped me learn the syntax of Java and improve my understanding of object-oriented programming.
A simple program to print text to the console.
Demonstrates the structure of a basic Java program.
Contains examples of:
forloopwhileloop
Used for understanding iteration and control flow.
Shows:
- Class creation
- Constructor
- Objects
- Methods
A simple demonstration of object-oriented programming.
Program to:
- Declare and initialize an array
- Iterate using enhanced
forloop - Calculate the sum of elements
This repo is part of my Java learning journey.
I created these programs while understanding:
- Java syntax
- OOP basics
- Flow control
- Arrays and loops
These fundamentals help me build a strong base for future Java development.
- Install Java (JDK 8+)
- Compile:
javac FileName.java