This repository contains a variety of practical Java 8 programs focused on building a strong foundation in modern Java concepts. Created as a learning project by a fresher, it covers the most important Java 8 features, including functional interfaces, lambda expressions, Predicate, Consumer, Supplier, Stream API, Optional class, and date/time API. The project is well-suited for beginners or anyone looking to revise Java 8, and it's especially useful for interview practice and exploring real coding scenarios questions with hands-on coding exercises.
The project is organized so you can focus on one feature or concept at a time. Each folder targets a specific area of Java 8.
src/
├── org.Java8.Supplier/
│ ├── Generate_6DigitOTP...
│ ├── LoginMainClass.java
│ ├── SuppliObjectOfBook.java
│ └── ...
│
├── otherJava8Feature/
│ ├── FileUploaderMainClass.java
│ ├── MethodReferenceOperatorQuestion1.java ... 10.java
│ └── PaymentMainClass.java
│
├── StreamApi/
│ ├── CountFrequency.java
│ ├── CustomerMainClass.java
│ ├── FindEvenNo.java
│ ├── RemoveDuplicates.java
│ ├── SortingUsingStreams.java
│ └── UseOfFlattenMap.java
│
├── StreamApi.AdvanceQuestionsOnStreams/
│ ├── CustomerBasedOperationAdvanceApproach.java
│ ├── CustomerBasedOpetations.java
│ ├── Task1.java ... Task13.java
│ └── ...
│
├── StreamApi.SenerioBasedQuestion/
│ ├── Ques3CreateCommaSeperated.java
│ ├── Ques1RemoveDuplicates.java
│ ├── Ques2Filter.java
│ ├── Ques4ShortEmployeeByLastName.java
│ ├── Ques5PrvntFromExceptionIfApiReturnNull.java
│ ├── Ques6GroupingOfEmployeeBasedDepartment.java
│ ├── Ques7WordCountOfChatList.java
│ └── Ques8HighestRatedEmployee.java
│
├── timeAndDateApi/
│ ├── DateTimerExample.java
│ ├── OperationsOnDates.java
│ └── SomeOperationsOnCalculatingPeriods.java
│
├── CollectionApiImprovement/
│ ├── RemoveIfMethod.java
│ └── ReplaceAllMethod.java
│
├── optionalClass/
│ ├── PlayWithOptionalClass.java
│ └── VarifyEmailMianClass.java
│
├── org.Java8/
│ ├── BiPredicateCheckAnagram.java
│ ├── BiPredicateCheckRange.java
│ ├── Consumer_PrintLengthOfString.java
│ ├── PredicateCheckOddAndGreater.java
│ └── ...
└── module_info.java
- StreamApi.SenerioBasedQuestion: Real-world, scenario-based stream problems for interview and practice.
- StreamApi.AdvanceQuestionsOnStreams: Advanced and complex stream operations; suitable for deeper stream learning and interview tasks.
- org.Java8.Supplier: Programs demonstrating Java 8 Supplier interface with real-world uses (e.g., OTP generator, book objects, random data).
- otherJava8Feature: Specialized feature demos including method references and file uploaders.
- StreamApi: Core programs for learning Stream API functions—filtering, mapping, sorting, etc.
- timeAndDateApi: Using the Java 8 Date/Time API for modern date and period calculations.
- optionalClass: Safe null handling and conditional logic with Java 8 Optional.
- org.Java8: Miscellaneous Java 8 features, especially on Predicate, Consumer, and BiPredicate with focused class files.