A structured, production-oriented reference library of 380+ Java programs spanning core language mechanics, classical algorithm design, advanced data structures, concurrency primitives, and applied number theory. Built as a living codebase — continuously expanded and categorized for engineering rigor.
- Repository Architecture
- Domain Taxonomy
- I. Concurrency & Multithreading
- II. Linear Data Structures & ADT Implementations
- III. Sorting Algorithm Suite
- IV. Multi-Dimensional Matrix Logic
- V. Advanced Array Manipulation & Search
- VI. Object-Oriented Architecture & Design Patterns
- VII. Exception Handling & Defensive Programming
- VIII. String Processing & Lexical Analysis
- IX. Number Theory & Computational Mathematics
- X. Mathematical Series & Sequence Generation
- XI. Cryptographic Encoding & Cipher Logic
- XII. Pattern Synthesis & Geometric Rendering
- XIII. Domain-Modeled Business Logic
- Local Execution Guide
- Project Structure
- Author
Java-Core-Concepts/
└── Programs/
├── *.java # Source files (380+)
├── *.class # Compiled bytecode
└── *.ctxt # BlueJ context metadata
All programs are self-contained, single-responsibility units. Each file compiles and runs independently with no external dependencies beyond the Java Standard Library.
Implementations of core Java concurrency primitives — thread lifecycle management, monitor-based synchronization, and the classic Producer-Consumer coordination pattern using wait()/notifyAll().
| File | Concept |
|---|---|
ProducerConsumer.java |
Bounded-buffer Producer-Consumer using synchronized, wait(), notifyAll() |
ThreadSynchronization.java |
Monitor-based mutual exclusion with synchronized methods on a shared resource |
ATMWithdrawal.java |
Race condition prevention in concurrent bank withdrawal simulation |
CounterThread.java |
Thread lifecycle and atomic counter management |
Hand-rolled implementations of foundational Abstract Data Types — no java.util scaffolding. Demonstrates deep understanding of pointer manipulation, memory layout, and interface contracts.
| File | Concept |
|---|---|
Stack.java |
Array-backed generic Stack with overflow/underflow guards, push/pop/display |
Node.java |
Singly Linked List with dynamic node insertion, traversal, salary-update mutation, and targeted deletion |
IntegerList.java |
Integer list ADT with custom iteration logic |
A comprehensive suite of classical and non-classical sorting algorithms implemented from first principles — no library sort calls.
| File | Algorithm | Complexity |
|---|---|---|
Sort_bubble.java |
Bubble Sort | O(n²) |
Selection_array.java / Selection_array2.java |
Selection Sort | O(n²) |
Selection_ascend.java / Selection_descend.java |
Bidirectional Selection Sort | O(n²) |
Pendulum_sort.java |
Pendulum Sort (oscillating placement) | O(n²) |
Circular_sort.java / Circular_sort2.java |
Circular Sort | O(n²) |
Arraymid_sort.java |
Mid-pivot Sort | O(n²) |
Sort_ascend.java / Sort_descend.java |
Comparative Sort variants | O(n²) |
Sort_percent.java |
Percentage-weighted Sort | O(n²) |
Sort_student.java / Selection_student.java |
Object-keyed Sort (student records) | O(n²) |
Matrix_sort.java |
Row-wise Matrix Sort | O(n² log n) |
Ar2D_rowsort.java / Ar2D_columnsort.java / Ar2D_fullsort.java |
2D Matrix Sort variants | O(n² log n) |
Advanced 2D matrix operations covering geometric transformations, traversal algorithms, and structural analysis — the kind of problems that appear in technical screening rounds.
| File | Operation |
|---|---|
Ar2D_spiralmatrix.java |
Spiral-order matrix population (layer-by-layer boundary traversal) |
Ar2D_rotate.java / Ar2D_rotate270.java / Ar2D_rotatefull.java |
In-place matrix rotation (90°, 270°, 360°) |
Ar2D_transpose.java |
Matrix transposition |
Ar2D_magicsquare.java / MagicSquare.java |
Magic square generation and validation |
Ar2D_symmetry.java |
Symmetric matrix detection |
Ar2D_prdiagonal.java / Ar2D_sqdiagonal.java |
Principal and secondary diagonal extraction |
Ar2D_zigzagtrix.java |
Zigzag traversal pattern |
Ar2D_trianmatrix.java |
Triangular matrix operations |
Ar2D_rowshift.java |
Circular row-shift transformation |
Ar2D_rowmaxmin.java |
Row-wise max/min extraction |
Ar2D_nextprimetrix.java |
Element-wise next-prime substitution |
Ar2D_matrange.java |
Range-bounded matrix filtering |
Ar2D_addmatrix.java / Ar2D_subtmatrix.java / Ar2D_multmatrix.java |
Matrix arithmetic operations |
Ar2D_colsum.java / Ar2D_sum.java |
Column-sum and total-sum aggregation |
Ar2D_squarem.java / Sq_matrix.java |
Square matrix validation and operations |
EqMat.java |
Matrix equality comparison |
Matrix_case.java |
Case-driven matrix operation dispatcher |
Single-dimensional array algorithms covering frequency analysis, set operations, structural rearrangement, and search strategies.
| File | Concept |
|---|---|
Linear_search.java |
Linear search with boundary validation |
Binary.java |
Binary search on sorted arrays |
Arr_common.java / Arr_union.java |
Set intersection and union on integer arrays |
Duplicate.java / Duplicate_remove.java |
Duplicate detection and in-place removal |
Ar_frequency.java / Freq.java |
Element frequency mapping |
Ar_maxfreq.java |
Maximum frequency element extraction |
Arrfrequency_prime.java |
Frequency-filtered prime extraction |
Array_rearrange.java |
Conditional element rearrangement |
Ar_posnegative.java |
Positive/negative partition |
Ar_oddindex.java |
Odd-index element extraction |
Ar_bound.java / Ar_Boundary.java |
Boundary element traversal |
Lucky_array.java / Lucky_array2.java |
Lucky number sieve on arrays |
Ar_sd.java |
Standard deviation computation |
Ar_roundvalue.java |
Rounding and precision normalization |
Ar_tripdig.java |
Triple-digit element filtering |
Ar_identical.java |
Array identity comparison |
Remove_element.java |
Targeted element removal with shift |
Largest_Set.java |
Maximum subset identification |
Prodmaxodd.java |
Product of maximum odd elements |
Productsmall.java |
Product of smallest elements |
CompX_ar1.java / CompX_ar2.java |
Comparative array analysis |
Exp_Ar_enhanced_loop.java |
Enhanced for-loop array traversal patterns |
Array_mobile.java |
Mobile-number array validation |
Programs demonstrating core OOP pillars — encapsulation, inheritance, polymorphism, and interface-driven design — applied to real-world domain models.
| File | Concept |
|---|---|
Shape.java |
Interface-based polymorphic shape hierarchy |
Employee.java |
Encapsulated employee entity with accessor/mutator contracts |
Bowler.java |
Inheritance-based sports domain model |
Calculator.java / Modifiedcalculator.java |
Stateful calculator with method overloading |
Switchcalculator.java |
Switch-dispatch arithmetic engine |
Area_overload.java / HCFOverload.java / PatOverload.java |
Method overloading across geometric and numeric domains |
Box_capacity.java |
Volumetric capacity model with constructor chaining |
Date.java / TimeAdd.java |
Temporal domain objects with validation logic |
Login.java / Security.java |
Credential validation and access control simulation |
Coin.java |
Denomination-based currency model |
Tax.java / Ebill.java / telebill.java |
Tax and billing computation models |
Telephone.java |
Telecom billing domain object |
Marks_average.java / Points_avg.java |
Academic scoring aggregation |
ClsStr1.java / ClsStr2.java |
String-class composition patterns |
InputProcessor.java |
Generic input processing abstraction |
EventListenerDemo.java |
Observer/event-listener pattern demonstration |
MyGuiExample.java |
AWT/Swing GUI component integration |
Custom exception hierarchies and multi-catch patterns demonstrating production-grade error boundary design.
| File | Concept |
|---|---|
HrsException.java |
Multi-exception hierarchy (HrsException, MinException, SecException) with domain-validated Time object |
ArrayIndexOutOfBoundsException.java |
Bounds-check exception handling and recovery |
ATMWithdrawal.java |
InterruptedException handling in concurrent context |
A deep suite of string manipulation algorithms covering lexical transformations, cipher operations, and linguistic analysis.
| File | Concept |
|---|---|
Str_anagram.java |
Anagram detection via character frequency matching |
Str_magic.java |
Magic string detection |
Str_encode.java / Str_encodeshift.java |
Character-shift encoding schemes |
Str_rotate.java / Str_rotation.java |
String rotation and rotation-equivalence check |
Str_sentsort.java |
Word-level sentence sorting |
Str_wordformat.java |
Word capitalization and formatting normalization |
Str_letcombination.java |
Letter permutation and combination generation |
Str_numbtorom.java |
Integer to Roman numeral conversion |
Str_numbtoword.java |
Integer to English word-form conversion |
Str_wordpercent.java |
Word-type percentage analysis |
Str_occurvowel.java / Str_vowel.java |
Vowel occurrence and frequency analysis |
Str_novowel.java |
Vowel-stripped string transformation |
Str_evenchar.java |
Even-indexed character extraction |
Str_interchange.java |
Character-position interchange |
Str_midelete.java |
Mid-character deletion |
Str_merge.java |
Sorted string merge |
Str_swap.java |
Word-pair swap transformation |
Str_ascii.java |
ASCII value mapping and analysis |
Str_blank.java |
Whitespace normalization |
Str_constr.java |
String construction from character constraints |
Str_convert.java |
Case and format conversion |
Str_count.java |
Character and word count analysis |
Str_notadd.java |
Numeric-string concatenation guard |
Str_ocurrence.java |
Substring occurrence counting |
Str_print.java |
Formatted string output patterns |
Str_test.java / Str_test2.java |
String method exploration |
Str_letter.java |
Letter classification and extraction |
String_check.java |
Multi-condition string validation |
String_doubleseq.java |
Double-character sequence detection |
String_length.java |
Length-based string operations |
StringModify.java |
In-place string modification patterns |
Reverse_string.java |
String and word-level reversal |
Psentence.java |
Sentence parsing and reconstruction |
Sentence.java |
Sentence-level lexical operations |
Word_number.java |
Word-to-number mapping |
Encrypt.java / Encrypt_Main.java / Encryptg.java |
Vowel-consonant segregation cipher with bubble-sort ordering |
Implementations of classical number-theoretic predicates and special integer classifications — a direct signal of algorithmic depth to any technical interviewer.
| File | Number Class |
|---|---|
Kaprekar.java |
Kaprekar numbers (range-based detection via digit-split squaring) |
Automorphic.java |
Automorphic number detection |
FascinatingNumber.java |
Fascinating number validation |
SpecialPureNumber.java |
Special pure number classification |
Neon.java |
Neon number detection (digit-sum of square equals original) |
Ugly_number.java |
Ugly number sequence (prime factors limited to 2, 3, 5) |
Adam_integer.java |
Adam integer (reversals of square are squares of reversal) |
Abundant.java |
Abundant number detection (sum of proper divisors > n) |
Amstrong.java |
Armstrong/Narcissistic number detection |
Palindrome.java / Palindrome1.java / Palinrange.java |
Palindrome detection and range enumeration |
FiboPrime.java |
Fibonacci-prime intersection |
NonFibo.java |
Non-Fibonacci number identification |
Octaprime.java |
Octal-prime classification |
Seprime.java |
Self-prime number detection |
Digit_prime.java |
Digit-sum prime validation |
Digcomposite.java |
Digit-composite classification |
ISprime.java |
Primality test |
Nextprime.java |
Next prime computation |
Sunny.java |
Sunny number detection |
Pell_number.java |
Pell sequence generation (P(n) = 2·P(n-1) + P(n-2)) |
PC_digit.java |
Digit-based prime/composite analysis |
DDigit_prog.java / Digit_prog.java |
Digit manipulation programs |
Digit_sum.java |
Iterative digit sum reduction |
Multiply_digits.java |
Digit product computation |
Takingdigits.java |
Digit extraction and reconstruction |
Digt_num.java |
Digit-count operations |
LCM.java / Lcm3.java |
LCM computation (2-variable and 3-variable) |
Compnumber.java |
Composite number classification |
Leapyear.java |
Gregorian leap year validation |
Quadratic.java |
Quadratic equation root solver (real and complex) |
Binodd.java |
Binomial odd-term analysis |
Iterative and recursive series generation covering classical sequences and custom recurrence relations.
| File | Series |
|---|---|
Fibonacciseries.java |
Fibonacci sequence |
Pell_number.java |
Pell sequence |
SeriesSum.java / SeriesSum1.java |
Summation series (various formulas) |
Series.java / Series2.java |
Custom recurrence series |
Sumseries.java |
Cumulative sum series |
Menu_series.java |
Menu-driven multi-series dispatcher |
Sumproduct.java / Sumproduct2.java |
Sum-product hybrid series |
Half_ascdesc.java |
Ascending-descending half-series |
Counting.java |
Counting sequence generation |
RecursionOutputs.java |
Recursive call-stack output tracing |
Character-level encoding and transformation algorithms demonstrating applied string manipulation under constraint.
| File | Cipher Type |
|---|---|
Encrypt.java |
Vowel-consonant segregation cipher with sorted-vowel prefix encoding |
Str_encode.java |
Positional character shift encoding |
Str_encodeshift.java |
Shift-cipher with configurable offset |
TWIST.java |
Character-twist transformation |
Dec_to_hex.java / ToHex.java |
Decimal-to-hexadecimal base conversion |
Dec_to_Oct.java / DeciOct.java |
Decimal-to-octal base conversion |
Hextodec.java |
Hexadecimal-to-decimal conversion |
charcon.java |
Character encoding conversion |
Nested-loop pattern generation — a deceptively deep domain for testing loop invariant reasoning and off-by-one precision.
| File | Pattern Type |
|---|---|
Pattern.java / Pattern1.java / Pattern2.java / Pattern3.java / Pattern4.java |
Numeric and symbolic grid patterns |
PatternA.java / Patternx.java |
Alphabetic and cross patterns |
Patter1.java |
Inverted triangle patterns |
Pat.java / Pat_tr.java |
Triangle and pyramid patterns |
CharRectangle.java |
Character-filled rectangle rendering |
Striangle.java |
Star-triangle pattern |
pate1hw.java / Pate2hw.java |
Homework-grade pattern exercises |
Object-oriented programs modeling real-world business domains — demonstrates ability to translate requirements into class hierarchies.
| File | Domain |
|---|---|
ATMWithdrawal.java |
Concurrent ATM transaction simulation |
Ebill.java |
Electricity billing with slab-rate computation |
telebill.java |
Telecom billing with call-rate tiers |
Tax.java |
Income tax computation with bracket logic |
Telephone.java |
Telephone directory and billing model |
Login.java / Security.java |
Authentication and access control |
Bowler.java |
Cricket bowler performance analytics |
Array_mobile.java |
Mobile number validation and storage |
Travprog.java |
Travel program cost computation |
PipesProblem.java |
Pipes-and-cisterns rate problem solver |
Schoolprograms.java |
School management domain model |
Menew.java / Menu.java |
Menu-driven application dispatcher |
Prerequisites: JDK 8+ installed and javac/java on your PATH.
cd Java-Core-Concepts/Programs
javac FileName.javajava FileNamecd Java-Core-Concepts/Programs
javac Ar2D_spiralmatrix.java
java Ar2D_spiralmatrixcd Java-Core-Concepts/Programs
javac ProducerConsumer.java
java ProducerConsumercd Java-Core-Concepts/Programs
javac Kaprekar.java Kaprekar_main.java
java Kaprekar_mainNote: Programs with a
_mainsuffix (e.g.,Kaprekar_main.java) contain themain()entry point and depend on their paired class file. Compile both together as shown above.
cd Java-Core-Concepts/Programs
javac *.javaJava-Core-Concepts/
├── README.md
└── Programs/
├── Concurrency → ProducerConsumer, ThreadSynchronization, ATMWithdrawal, CounterThread
├── Data Structures → Stack, Node (Linked List), IntegerList
├── Sorting Algorithms → Bubble, Selection, Pendulum, Circular, Matrix sorts
├── 2D Matrix Logic → Spiral, Rotate, Transpose, Magic Square, Zigzag, Diagonal
├── Array Algorithms → Search, Set ops, Frequency, Rearrangement, Lucky sieve
├── OOP & Design → Employee, Shape, Calculator, Date, Login, EventListener
├── Exception Handling → HrsException hierarchy, ArrayIndexOutOfBounds
├── String Processing → Anagram, Cipher, Rotation, Roman numerals, Word conversion
├── Number Theory → Kaprekar, Automorphic, Neon, Ugly, Armstrong, Pell, FiboPrime
├── Series Generation → Fibonacci, Pell, Custom recurrence, SeriesSum
├── Encoding & Ciphers → Encrypt, Shift cipher, Base conversion (Hex, Octal)
├── Pattern Rendering → Triangle, Pyramid, Grid, Alphabetic patterns
└── Business Logic → ATM, Billing, Tax, Authentication, Sports analytics
Sayan — 3rd Year B.Tech, Computer Science Engineering
Actively building toward a career in enterprise software engineering. This repository is a living reference — programs are continuously added, refactored, and categorized as new concepts are mastered.
Built with Java SE · Compiled with javac · No external dependencies