Skip to content

SagarXCode/java-foundations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 

Repository files navigation

Java Foundations

This repository documents my journey of learning Java from basic to advanced concepts through consistent hands-on practice. It includes small programs and examples covering fundamentals, object-oriented programming, collections, exception handling, multithreading, and modern Java features.

The goal of this repository is to strengthen my Java fundamentals by implementing concepts through code, with frequent commits reflecting my ongoing learning and progress.


📌 Topics Covered

01. Basics

Introduces Java fundamentals including Hello World program, comments, variables, data types, type casting (implicit and explicit), user input using Scanner, operators, conditionals (if-else, switch), loops (for, while, do-while), methods (declaration, parameters, return types, overloading, recursion), arrays (1D and 2D), and comprehensive string handling including common string algorithms and performance comparisons.

02. Core Java

Covers object-oriented programming (OOP) concepts including classes, objects, constructors, inheritance, polymorphism, encapsulation, abstraction, abstract classes, and interfaces. Also includes Object class methods (toString, equals, hashCode), important Java keywords (this, super, static, final), access modifiers, packages and imports, wrapper classes, and value vs reference behavior in Java.

03. Intermediate Java

Focuses on building more structured applications using exception handling (try-catch, throw, throws, custom exceptions), Java Collections Framework (List, Set, Map, Queue, Deque), sorting with Comparable and Comparator, generics, enums, inner classes (member, static nested, local, anonymous), and annotations.

04. Advanced Java

Explores advanced concepts including file handling (IO and NIO), multithreading and concurrency (threads, synchronization, executors, futures), Java 8 features (lambda expressions, functional interfaces, streams, method references, Optional), Date & Time API, serialization (Serializable and Externalizable), and JVM internals such as memory management, garbage collection, and class loading.


📂 Repository Structure

Java-Fundamentals/
└── src/
    ├── 01-Basics/
    │   ├── HelloWorld.java
    │   ├── Comments
    │   ├── Variables.java
    │   ├── DataTypes.java
    │   │
    │   ├── TypeCasting/
    │   │   ├── ImplicitCasting.java
    │   │   └── ExplicitCasting.java
    │   │
    │   ├── Input/
    │   │   ├── ScannerBasics.java
    │   │   ├── TakingIntegerInput.java
    │   │   ├── TakingMultipleInputs.java
    │   │   └── InputValidation.java
    │   │
    │   ├── Operators.java
    │   │
    │   ├── Conditionals/
    │   │   ├── IfElse.java
    │   │   └── SwitchCase.java
    │   │
    │   ├── Loops/
    │   │   ├── ForLoop.java
    │   │   ├── WhileLoop.java
    │   │   └── DoWhileLoop.java
    │   │
    │   ├── Methods/
    │   │   ├── MethodDeclaration.java
    │   │   ├── MethodParameters.java
    │   │   ├── MethodReturnTypes.java
    │   │   ├── MethodOverloadingIntro.java
    │   │   └── RecursionIntro.java
    │   │
    │   ├── Arrays/
    │   │   ├── OneDArray.java
    │   │   ├── TwoDArray.java
    │   │   ├── ArrayOperations.java
    │   │   ├── ArrayMethods.java
    │   │   └── PassingArray.java
    │   │
    │   └── Strings/
    │       ├── StringDeclaration.java
    │       ├── StringInputOutput.java
    │       ├── StringLengthAndCharAt.java
    │       ├── StringComparison.java
    │       ├── StringConcatenation.java
    │       ├── StringSubstring.java
    │       ├── StringSearching.java
    │       ├── StringCaseConversion.java
    │       ├── StringTrimAndReplace.java
    │       ├── StringSplitAndJoin.java
    │       ├── StringImmutabilityDemo.java
    │       ├── StringBuilderDemo.java
    │       ├── StringBufferDemo.java
    │       ├── StringToNumberConversion.java
    │       ├── NumberToStringConversion.java
    │       ├── StringFormattingDemo.java
    │       ├── StringRegexValidation.java
    │       ├── StringPerformanceTest.java
    │       │
    │       ├── ReverseString.java
    │       ├── PalindromeCheck.java
    │       ├── CountVowels.java
    │       ├── CountCharacterFrequency.java
    │       ├── RemoveDuplicatesFromString.java
    │       └── RemoveWhiteSpaces.java
    │    
    │
    ├── 02-Core-Java/
    │   ├── OOP/
    │   │   ├── ClassAndObject.java
    │   │   ├── Constructor.java
    │   │   ├── Inheritance.java
    │   │   ├── Polymorphism.java
    │   │   ├── Encapsulation.java
    │   │   ├── Abstraction.java
    │   │   ├── AbstractClasses.java
    │   │   └── Interfaces.java
    │   │
    │   ├── Object-Class/
    │   │   ├── ToStringDemo.java
    │   │   ├── EqualsAndHashCodeDemo.java
    │   │   └── CloneIntro.md
    │   │
    │   ├── Keywords/
    │   │   ├── ThisKeyword.java
    │   │   ├── SuperKeyword.java
    │   │   ├── StaticKeyword.java
    │   │   └── FinalKeyword.java
    │   │
    │   ├── AccessModifiers/
    │   │   ├── PublicModifier.java
    │   │   ├── ProtectedModifier.java
    │   │   ├── DefaultModifier.java
    │   │   └── PrivateModifier.java
    │   │
    │   ├── Packages/
    │   │   ├── PackageCreation.java
    │   │   ├── ImportStatement.java
    │   │   └── AccessAcrossPackages.java
    │   │
    │   ├── WrapperClasses.java
    │   │
    │   └── Value-vs-Reference/
    │       ├── PassByValuePrimitives.java
    │       ├── PassByValueReferences.java
    │       └── ImmutabilityDesign.java
    │
    ├── 03-Intermediate-Java/
    │   ├── ExceptionHandling/
    │   │   ├── TryCatch.java
    │   │   ├── MultipleCatch.java
    │   │   ├── FinallyBlock.java
    │   │   ├── ThrowKeyword.java
    │   │   ├── ThrowsKeyword.java
    │   │   └── CustomException.java
    │   │
    │   ├── Collections/
    │   │   ├── List/
    │   │   │   ├── ArrayListDemo.java
    │   │   │   ├── LinkedListDemo.java
    │   │   │   └── VectorDemo.java
    │   │   │
    │   │   ├── Set/
    │   │   │   ├── HashSetDemo.java
    │   │   │   ├── LinkedHashSetDemo.java
    │   │   │   └── TreeSetDemo.java
    │   │   │
    │   │   ├── Map/
    │   │   │   ├── HashMapDemo.java
    │   │   │   ├── LinkedHashMapDemo.java
    │   │   │   └── TreeMapDemo.java
    │   │   │
    │   │   ├── Queue-and-Deque/
    │   │   │   ├── PriorityQueueDemo.java
    │   │   │   └── ArrayDequeDemo.java
    │   │   │
    │   │   ├── Iteration-Pitfalls/
    │   │   │   └── ConcurrentModificationDemo.java
    │   │   │
    │   │   └── Sorting/
    │   │       ├── ComparableDemo.java
    │   │       └── ComparatorDemo.java
    │   │
    │   ├── Generics/
    │   │   ├── GenericClass.java
    │   │   ├── GenericMethod.java
    │   │   └── WildcardsDemo.java
    │   │
    │   ├── Enums/
    │   │   ├── EnumBasics.java
    │   │   └── EnumWithMethods.java
    │   │
    │   ├── InnerClasses/
    │   │   ├── MemberInnerClass.java
    │   │   ├── StaticNestedClass.java
    │   │   ├── LocalInnerClass.java
    │   │   └── AnonymousClass.java
    │   │
    │   └── Annotations/
    │       ├── OverrideAnnotation.java
    │       └── CustomAnnotation.java
    │
    └── 04-Advanced-Java/
        ├── FileHandling/
        │   ├── FileIO.java
        │   ├── BufferedStreams.java
        │   ├── TryWithResources.java
        │   └── NIOExample.java
        │
        ├── Multithreading/
        │   ├── ThreadClass.java
        │   ├── RunnableInterface.java
        │   ├── ThreadLifecycle.java
        │   ├── Synchronization.java
        │   ├── InterThreadCommunication.java
        │   ├── ExecutorFramework.java
        │   ├── CallableAndFuture.java
        │   └── CompletableFutureBasics.java
        │
        ├── Java8Features/
        │   ├── LambdaExpressions.java
        │   ├── FunctionalInterfaces.java
        │   ├── StreamsAPI.java
        │   ├── MethodReferences.java
        │   └── OptionalClass.java
        │
        ├── DateTimeAPI/
        │   └── DateTimeExamples.java
        │
        ├── Serialization/
        │   ├── SerializableDemo.java
        │   └── ExternalizableDemo.java
        │
        └── JVM-Internals/
            ├── MemoryManagement.md
            ├── GarbageCollection.md
            └── ClassLoader.md

About

Practicing Java foundations daily — includes programs on syntax, variables, loops, conditionals, methods, and basic OOP concepts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages