Welcome to the Java side of this monorepo! This guide is designed for both beginners and those preparing for interviews, with a focus on hands-on learning and real-world application.
- src/main/java/com/: Business logic for the e-commerce and loan management system (Spring Boot based)
- src/main/java/dsa/: Data structures and algorithms—great for interview prep and Java fundamentals
- src/main/java/leetcode/: LeetCode and coding challenge solutions
- test/java/: Unit and integration tests for both business and DSA code
- OOP Principles: Classes, objects, inheritance, polymorphism, encapsulation, abstraction
- See:
ParentChildTest.java,ParentChildTest2.java,BuilderPatternOrder.java
- See:
- Collections Framework: Lists, Sets, Maps, Queues, Stacks
- See:
ArrayListBST.java,MapsExample.java,CustomLinkedList.java
- See:
- Exception Handling: try-catch, custom exceptions, checked vs unchecked
- See:
exception/package in business logic, and DSA examples
- See:
- Threads & Concurrency: Thread creation, synchronization, deadlocks
- See:
ThreadingExample.java,DeadlockExample.java,LocksExample.java
- See:
- Streams & Lambdas: Functional programming in Java 8+
- See:
StreamExample.java,StreamExamples.java
- See:
- String Manipulation: String methods, immutability, performance
- See:
StringMethodsExample.java
- See:
- DSA Folder: Practice classic data structures (linked lists, trees, stacks, queues) and algorithms (sorting, searching, recursion)
- LeetCode Folder: Real-world coding problems, often asked in interviews
- Patterns: Builder, Singleton, Factory, etc. (see
BuilderPatternOrder.java) - Java Language Features: Practice with generics, enums, annotations, and inner classes
- Follow Java naming conventions (
CamelCasefor classes,camelCasefor variables/methods) - Keep classes focused and methods short
- Use interfaces and abstract classes for extensibility
- Prefer immutability where possible (use
final) - Avoid magic numbers/strings—use constants
- Write JavaDocs for public classes and methods
- Use unit tests to verify logic (see
test/java/) - Clean up unused code and imports before committing
- Setup: Install JDK 11+ and an IDE (IntelliJ IDEA or Eclipse recommended)
- Build: Use Maven wrapper (
mvnw.cmd clean install) - Run Tests:
mvnw.cmd test - Explore: Start with simple DSA classes, then move to business logic
- Practice: Try modifying DSA/LeetCode examples or add your own
- Be able to explain OOP concepts with code examples
- Practice writing and debugging code without an IDE (for whiteboard interviews)
- Know the time/space complexity of your solutions
- Be comfortable with Java 8+ features (lambdas, streams, Optionals)
- Review exception handling and custom exceptions
- Practice multi-threading basics and common pitfalls (deadlocks, race conditions)
For more details, see .github/copilot-instructions.md and the Spring Boot Newcomers Guide in .github/newcomers-spring-boot.md.