Skip to content

Instantly share code, notes, and snippets.

View adityachaudhari's full-sized avatar
🎯
Focusing

Aditya Chaudhari adityachaudhari

🎯
Focusing
View GitHub Profile
package com.examples.java8.ListTomap;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Created by adityacchaudhari
*/
@adityachaudhari
adityachaudhari / NumberToWord.java
Last active June 27, 2017 20:14
Write a program to print numeric number into English words. (Minimum 3 digit numeric) Input: 947 Output: nine hundred forty seven
package com.examples.java8.ListTomap;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by adityacchaudhari on 27/06/2017.
@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
@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 / 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 / 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;
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 / 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[]) {
@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 / 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) {