Skip to content

Basic Java practice programs demonstrating fundamentals such as loops, arrays, classes, objects, and constructors.

Notifications You must be signed in to change notification settings

Aadesh-9/java-practice

Repository files navigation

Java Practice Programs

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.


📂 Files Included

1. HelloWorld.java

A simple program to print text to the console.
Demonstrates the structure of a basic Java program.

2. BasicLoops.java

Contains examples of:

  • for loop
  • while loop

Used for understanding iteration and control flow.

3. OOPExample.java

Shows:

  • Class creation
  • Constructor
  • Objects
  • Methods

A simple demonstration of object-oriented programming.

4. ArrayExample.java

Program to:

  • Declare and initialize an array
  • Iterate using enhanced for loop
  • Calculate the sum of elements

💡 Purpose of This Repository

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.


🛠 How to Run

  1. Install Java (JDK 8+)
  2. Compile:
    javac FileName.java

About

Basic Java practice programs demonstrating fundamentals such as loops, arrays, classes, objects, and constructors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages