- Overview
- Repository Structure
- Topics Covered
- Examples
- Setup & Usage
- Contributing
- Coding Standards
- License
Core‑Java is a collection of Java fundamentals and advanced topics designed to help learners solidify their understanding of the language. It includes hands‑on examples across Object Oriented Programming (OOP), Collections, Exception Handling, Threads, File Handling, and more. This repository is suited for both beginners and intermediate learners preparing for interviews, projects, or exams.
Core‑Java/
├── JavaBasics/
├── OOP_Basics/
├── BasicsOOP/
├── Collections/
├── Exception Handling/
├── File Handling/
├── Threads/
├── .gitignore
└── README.md
- JavaBasics: Primitive types, control flow statements, loops, basic Java syntax.
- OOP_Basics / BasicsOOP: Classes, objects, inheritance, polymorphism, encapsulation, abstraction.
- Collections: Java Collections Framework — Lists, Sets, Maps, etc.
- Exception Handling: Checked vs unchecked exceptions, try‑catch blocks, custom exceptions.
- File Handling: I/O operations, file reading/writing, streams.
- Threads: Multithreading concepts, synchronization, concurrency basics.
Here are some of the concepts/examples you’ll find:
| Topic | Key Concepts / Sample Tasks |
|---|---|
| Java Basics | Variables, operators, conditions, loops |
| OOP Principles | Class design, inheritance, interfaces, polymorphism |
| Collections Framework | ArrayList, HashMap, TreeSet, iterators |
| Exception Handling | try, catch, finally, throw/throws, custom exceptions |
| File & Stream I/O | Reading/writing files, buffered streams, serialization |
| Multithreading & Concurrency | Threads, Runnable, synchronized, thread safety |
Some sample files/tasks you might explore:
- Creating classes for real‑world entities (e.g.
Person,Employee) demonstrating inheritance. - Implementing custom comparators for sorting collections.
- Handling I/O with
FileReader,BufferedWriter. - Using
ThreadandRunnableto create concurrent tasks; simple synchronization cases. - Defining & throwing custom exception types.
To run or test any part of this repository locally:
-
Clone the repository
git clone https://github.com/krutikapatil19/Core‑Java.git
-
Navigate to a topic folder
cd Core‑Java/Threads -
Compile Java source
javac SomeExample.java
-
Run the compiled class
java SomeExample
You can also import the code into an IDE (IntelliJ, Eclipse, VSCode) to explore and run more conveniently.
Contributions are very welcome! To contribute:
- Fork this repository.
- Create a new branch:
git checkout ‑b feature/YourFeatureName
- Add your code, examples or improvements.
- Ensure code is well formatted, commented, and includes edge case handling.
- Commit your changes with a meaningful message.
- Push to your fork and open a Pull Request.
To keep the code consistent and readable, please follow:
- Use clear, meaningful names for classes, methods, variables.
- Keep methods and classes focused (one responsibility).
- Comment non‑trivial logic.
- Handle nulls, invalid inputs, edge cases.
- Follow Java naming conventions: PascalCase for classes, camelCase for methods/variables.
- Organize imports; avoid unused code.
Specify the license under which this project is distributed. If you use MIT (or another), include a LICENSE file with the full text.
Questions, suggestions or feedback are welcome — feel free to open an issue or submit a PR!
Happy Coding! 🚀