Skip to content

Instantly share code, notes, and snippets.

View adityachaudhari's full-sized avatar
🎯
Focusing

Aditya Chaudhari adityachaudhari

🎯
Focusing
View GitHub Profile
@adityachaudhari
adityachaudhari / MapAndFlapMapUnderstanding.java
Created October 17, 2021 11:51
Understand difference between map and flatmap
package com.java8.streams;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class MapAndFlapMapUnderstanding {
public static void main(String[] args) {
@adityachaudhari
adityachaudhari / ReduceUnderstanding.java
Last active October 17, 2021 09:26
reduce in java 8 understanding example code
package com.java8.streams;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
public class ReduceUnderstanding {
public static void main(String[] args) {
@adityachaudhari
adityachaudhari / OptionalUnderstanding.java
Created October 7, 2021 17:21
Optional in java 8 understanding
package com.java8.optional;
import com.java8.businessdataobjects.Student;
import java.util.*;
public class OptionalUnderstanding {
public static void main(String[] args) {
@adityachaudhari
adityachaudhari / FunctionalInterfacesUnderstandingJava8.java
Created October 5, 2021 02:00
Understanding functional interfaces java 8
package com.java8.functionalinterfaces;
import com.java8.dateandtime.DateTimeAPIJava8;
import sun.util.resources.LocaleData;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.Date;
import java.util.function.*;
@adityachaudhari
adityachaudhari / ComparatorBeforeAndWithJava8.java
Created October 3, 2021 07:03
ComparatorBeforeAndWithJava8
package com.java8.comparator;
import com.java8.businessdataobjects.Student;
import java.util.*;
import java.util.stream.Collectors;
public class ComparatorBeforeAndWithJava8 {
public static void main(String args[]) {
package com.java8.functionalinterfaces;
import java.util.function.UnaryOperator;
public class MethodReferenceJava8Example {
public static void main(String[] args) {
String testString1 = "THis is NEW TEst 1 StriNG";
String testString2 = "THis is NEW TEst 2 StriNG";
@adityachaudhari
adityachaudhari / FunctionalInterfacesUnderstandingJava8.java
Created September 11, 2021 12:23
Functional interfaces understanding
package com.java8.functionalinterfaces;
import java.util.function.*;
public class FunctionalInterfacesUnderstandingJava8 {
public static void main(String[] args) {
// take one argument and returns boolean. method declaration : boolean test(T t);
Predicate<String> stringLengthCheckPredicate = (str) -> str.length() < 5;
@adityachaudhari
adityachaudhari / LambdaExpressionVsAnonymousInnerClass.java
Created September 11, 2021 12:12
LambdaExpressionVsAnonymousInnerClass
package com.java8.anonymousvslambda;
public class LambdaExpressionVsAnonymousInnerClass {
public static void main(String[] args) {
// anonymous inner class
Runnable runnableAnonymous = new Runnable() {
@Override
public void run() {
@adityachaudhari
adityachaudhari / schema.xml
Created September 13, 2019 08:48
schema file for my first solr core
<?xml version="1.0" ?>
<!--
Copyright 2013 Alfredo Serafini (http://seralf.it)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@adityachaudhari
adityachaudhari / solrconfig.xml
Last active September 13, 2019 08:43
solrconfig.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2013 Alfredo Serafini (http://seralf.it)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0