vaibhav chugh's repositories
MVVMGithubSample
This project is based on the MVVM and Repository Design pattern.
Android-Studio-Plugins
This is a list of all awesome and useful android studio plugins.
BasicDagger2Application
@Dagger 2- In this android application, I have used java language to give more understanding in which I use only @field injector, @constructor injector, and @method injector.
HashMapArrayListApproach
Use this Approach for adding new Arraylist in Hashmap.
Java1.8_feature_Java_Stream
A new java.util.stream has been added in Java 8 to perform filter/map/reduce like operations with the collection. Stream API will allow sequential as well as parallel execution. This is one of the best feature for me because I work a lot with Collections and usually with Big Data, we need to filter out them based on some conditions. Collection interface has been extended with stream() and parallelStream() default methods to get the Stream for sequential and parallel execution. Let’s see their usage with simple example.
Java18_feature_default__static_methods_in_Interfaces
As we know interface cannot not have method body.From java 8,interface are enhance to have method with implementation. we can use default and static keyword to create interfaces with method implementations. We know that java doesn't have multiple inheritance in classes because it leads to Diamond Problem. so how it will be handle interfaces now.since interfaces are now similar to abstract class.
Java_1.8feature_with_the_use_of_consumer_insteadof_iteratorlogic
Whenever we need to traverse through a Collection, we need to create an Iterator whose whole purpose is to iterate over and then we have business logic in a loop for each of the elements in the Collection. We might get ConcurrentModificationException if iterator is not used properly. Java 8 has introduced forEach method in java.lang.Iterable interface so that while writing code we focus on business logic only. forEach method takes java.util.function.Consumer object as argument, so it helps in having our business logic at a separate location that we can reuse. Let’s see forEach usage with simple example.
BasicDaggar2ApplicationPart2
Dagger2 - Part-2 In Java.