# JavaSpace

A collection of all the Java programs I've worked on so far.

## Table of contents

## Table of Contents - [Basics](#Basics) - [Data Conversion](#Data-Conversion) - [Data Structures](#Data-Structures) - [Searching And Sorting Algorithms](#Searching-And-Sorting-Algorithms) - [OOPS](#OOPS) - [Exception Handling](#Exception-Handling) - [Threads](#threads) - [Miscellaneous](#Miscellaneous) - [Contributing](#Contributing) - [License](#License)## Basics

Basics of Java are covered within these programs.

• GP.java | Calculates Grade Pay. • Pyramid.java | Number Pyramid. • Average.java | Average of N numbers. • Cutoff.java | Calculate PCM Cut-off. • Denomination.java | Money Denomination in India. • EvenAndOdd.java | Finds Odd and Even numbers from given numbers. • Flag.java | A Star pattern. • Fun1.java | A Simple turn-based game. • LeapYear.java | Checks if leap year. • Merge.java | Merges two Arrays. • Palindrome.java | Checks if Palindrome or not. • Power.java | Calculates A raised to B. • Prime.java | Prints prime numbers from 0-100. • Recursion.java | Prints N Fibonacci numbers. • Reverse.java | Reversing a Number or String. • Sorting.java | Sorting N numbers. • Squares.java | Print squares until N'th turn. • Tables.java | Print Multiplication table. • Factorial.java | To find Factorial of a number. • Strong number.java | Check for Strong number. • Fibonacci.java | To find Fibonacci series up to a given number. • FizzBuzz.java | The FizzBuzz problem is a classic test given in coding interviews. • DuplicateChars.java | A simple program that checks a string for duplicate characters.

## Data Conversion

Contains programs that revolve around various Number Systems.

• BinaryCheck.java | Checks if number has even number 1's in it's binary format or not. • Bintodecimal.java | Binary to Decimal. • Binary.java | Check if Binary or not. • DeciToBinary.java | Decimal to Binary. • DeciToOctal.java | Decimal to Octal. • DeciToHexa.java | Decimal to Hexa

## Data Structures

Programs Relating to the implementation of various Data Structures are present in this folder.

• Queue.java | Queue Implementation. • BST.java | Binary Search Tree. • CircularQueue.java | Circular Queue Implementation. • DLL.java | Double Linked List. • Linkedlist.java | Linked List. • <a href=https://github.com/SVijayB/JavaSpace/blob/master/Data_Structures/DetectCycleInList.java">DetectCycleInList.java</a> | Detect Cycle in an Undirected Graph (using DFS) <a href=https://github.com/SVijayB/JavaSpace/blob/master/Data_Structures/Topological_sort_BFS.java">Topological_sort_BFS.java</a> | Topological_sort_BFS • Stackpr1.java | Stack Implementation. • Kruskal's algorithm.java | Kruskal's algorithm to find shortest path. • Linear Probing.java | Creating a Hash Table using Linear Probing method. • InorderTraversal.java | Inorder traversal in java. • KthMinAndMaxInArray.java | Finding Kth smallest and largest element in an array.

## Searching And Sorting Algorithms

Programs used for searching and sorting given elements.

• Binary Search.java | Iterative Binary Search. • Linear Search.java | Linear Searching Algorithm. • Heap Sort.java | Sorting entires using Heap Sort. • Merge Sort.java | Sorting using Merge Sort. • Bubble Sort.java | Sorting using Bubble Sort. • QuickSort.java | Quick Sort. • Selection Sort.java | Selection Sort. • Insertion Sort.java | Insertion Sort. • Radix Sort.java | Radix Sort.

## OOPS

Implementing Object Oriented Programming System(OOPs) in Java.

• Classes.java | Understanding classes in java. • Initializing_objects.java | Creating/initializing data using reference variables. • Static.java | Understanding uses of static variables. • Polymorphism.java | Exploring Polymorphism in OOPS. • Constructors.java | Initializing variables using constructors in Java. • Object.java | Objects in java. • Variables.java | Different types of variables in java. • ArrayOfObjects.java | Creating an array of objects. • Encapsulation.java | Encapsulation of data. • Accessing.java | Accessing private variables using public methods. • AbstractClass.java | Understanding abstract classes.

### Examples

Various examples to help implement OOPS in Java.

• Holiday.java | Class Objects and Methods. • Bookstore.java | Static, final and Constructors. • SemesterMarks.java | Understanding Inheritance. • Shape.java | Example for Polymorphism. • GenericMethods.java | Using generic classes and methods. • Distribution.java | Parameterised constructor and exception handling. • Shapes.java | Example for Inheritance.

## Exception Handling

Handling various exceptions using the try, catch, finally and throw keywords in Java.

• Try_and_catch.java | Using the try and catch keywords. • Try_and_finally.java | Replacing try, catch and finally keywords. • Multicatch_block.java | Implementing multiple catch blocks. • Nested_try1.java | Example - 1 for nested try blocks. • Nested_try2.java | Example - 2 for nested try blocks. • Throw.java | Using the throw keyword. • Throw2.java | Execution of lines after the throw keyword. • Balance_addition.java | Exception handling example.

## Threads

• Threads.java | Threads implementation in java. • multi_threads.java | Implementing multi-threads. • synchronization.java | Synchronizing threads. • Matrix.java | Finding the sum of matrix elements using threads. • Test1.java | Test case example for multi-threads.

## Miscellaneous

• BinaryConcat.java | Decimal value of Binary concatenation of given number. • DungeonQuest.java | A turn-based RPG text game. • EvenPerfectSquare.java | Checks if sum of numbers at even position is perfect square or not. • FibonacciPrime.java | Prints Prime Numbers in Fibonacci Series. • GameOfLife.java | A short choice based game. • GameOfCoordinates.java | A game to check if you can move to a point based on preset rules. • NarcissticNo.java | Prints Narcisstic and Armstrong Numbers. • PythagoreanPrimes.java | Checks if given number is a Pythagorean Prime or not. • RLD.java | Checks if given number is Reverse Length Divisible or not. • AmicableNo.java | Prints all the pairs of Amicable Numbers until N. • Decimal.java | Finds the sum of numbers before and after decimal point. • Encryption.java | Encrypts and Decrypts Information Provided. • Flames.java | A simulation of the game, flames. • NonLoop.java | A simple game to understand recursion. • Permstring.java | Prints permutations of a given String. • Project.java | A school project on university counselling • RandomNo.java | Prints N random numbers within a given range • Resort.java | A Simple program to understand concepts of OOP in Java. • Append.java | Helps in creating lists in python. • UrlConcat.java | Program to create a link tag for HTML and saving output to clipboard. • TagContentExtractor.java | Obtaining string between html tags. • SportsCatalogue.java | Creating a sports catalogue with OOPS. • DutchNationalFlagAlgo.java | Algorithm to sort 0's 1's and 2's in a array • InterchangeAndAdd.java | Interchange matrices and add them. • PalindromeCheck.java | Checks if given string is a palindrome. • TwoPointersAlgo.java | Searches for pairs in a sorted array. • matrix.java | Finding the sum of two matrices. • Pizza.java | GUI calculator to bill products.

## Contributing

To contribute to the program collection, fork the repository, create a new branch and send us a pull request. Make sure you read CONTRIBUTING.md before sending us Pull requests.

### Special thanks to all the contributors✨

## License

This repository is under The MIT License. Read the LICENSE file for more information.