Coder Social home page Coder Social logo
vaibhav chugh photo

vaibhavchugh09 Goto Github PK

followers: 9.0 following: 0.0 repos: 8.0 gists: 0.0

Name: vaibhav chugh

Type: User

Company: Techmahindra (Client Side - Samsung R&D)

Bio: Android Developer | SSE at Techmahindra (Client Side - Samsung R&D) TechEvangelist #Developer by heart. Love to explore new things. #CoderbyHeart #Traveller

Twitter: vaibhavchugh09

Location: India

vaibhav chugh's Projects

basicdagger2application icon 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.

java1.8_feature_java_stream icon 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 icon 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 icon 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.