This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.java8.optional; | |
import com.java8.businessdataobjects.Student; | |
import java.util.*; | |
public class OptionalUnderstanding { | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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[]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.java8.anonymousvslambda; | |
public class LambdaExpressionVsAnonymousInnerClass { | |
public static void main(String[] args) { | |
// anonymous inner class | |
Runnable runnableAnonymous = new Runnable() { | |
@Override | |
public void run() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
NewerOlder