Skip to content

Ishan1012/Java-Practice-Programs

Repository files navigation

Java Programming Practice Files

Welcome to my collection of Java programming practice files. These files demonstrate various Java programming concepts and techniques that I've learned throughout my coursework. Each file is a standalone program that focuses on a specific topic or problem.

Table of Contents

  1. Introduction
  2. Programs
  3. How to Compile and Run
  4. Learning Resources

Introduction

This repository contains practice Java programs that I developed during my college coursework. The files cover a wide range of Java programming topics such as:

  • Basic Syntax and Data Types
  • Control Flow (loops, conditionals)
  • Object-Oriented Programming (OOP)
  • Inheritance and Polymorphism
  • Exception Handling
  • File I/O
  • Collections and Generics
  • Multithreading

Each file is well-documented with comments explaining the logic behind the code.

Programs

Below is a list of the key programs in this repository:

Filename Description
HelloWorld.java Basic program to print "Hello, World!"
Calculator.java Simple calculator performing addition, subtraction, etc.
Factorial.java Program to calculate the factorial of a given number
ArraySort.java Sorting an array of integers using the bubble sort
InheritanceDemo.java Demonstrates inheritance and method overriding
FileIOExample.java Reading from and writing to a file
ThreadExample.java Example of creating and running threads in Java
GenericExample.java Demonstrates the use of generics in Java

Feel free to browse the individual files for more information on each program.

How to Compile and Run

You can compile and run any of these Java programs using the javac compiler and java command. Below are the steps to compile and execute a program:

  1. Compiling a Program: Open your terminal and navigate to the folder containing the Java file you want to compile. Use the following command to compile:

    javac Filename.java

    Example for HelloWorld.java:

    javac HelloWorld.java
  2. Running the Program: After compilation, you can run the program using:

    java Filename

    Example:

    java HelloWorld

Learning Resources

Here are some additional resources that helped me in learning Java programming:

Feel free to explore these resources to deepen your understanding of Java.

Contributing

This repository is for educational purposes, but if you have suggestions or improvements, feel free to fork the repo and submit a pull request.


Thank you for visiting this repository! Happy coding! 🚀

About

A repository of Java programming exercises focused on mastering key concepts, algorithms, and data structures through hands-on practice.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors