Java interview questions on streams

Java interview questions on streamsCore Concepts What is a Stream? A sequence of elements that supports sequential or parallel operations. Streams do not store data; they operate on... read more ?

Java 8 coding interview questions

 Java 8 coding questions: Problem Solution Separate Odd and Even Numbers listOfIntegers.stream().collect(Collectors.partitioningBy(number -> number % 2 == 0)); Remove Duplicates from List listOfStrings.stream().distinct().toList(); Character Frequency in String input.chars().mapToObj(c... read more ?

Java 8 subtract N minutes from current date

subtract+minutes+from+java+8+date+time

Java 8 provides java.time.LocalDateTime class. By using minusMinutes() methods of LocalDateTime class we can subtract minutes from date or current date in java. Lets see an example program... read more ?

How to Add N minutes to current date using java 8

add+minutes+to+current+date+java+8

Java 8 providing java java.time package which is having more utility methods related to date and time. LocalDateTime class providing plusMinutes(int minutes) method to add minutes to current... read more ?

Can we define default methods in functional interfaces in java 8

Can+we+define+default+methods+in+functional+interfaces+in+java+8

Functional interfaces in java 8 will have single abstract method in it. Check below two pages regarding defining and using functional interfaces using Lamda expressions. Java 8 functional... read more ?

Functional interface with multiple methods in java 8

functional+interface+with+multiple+methods

Functional interfaces will contains single abstract method with @FunctionalInterface annotation. Check below two posts for defining functional interface and implementing functional interface method using Lamda in java 8.... read more ?

Implement java 8 functional interface using lambda example program

functional+interface+example+in+java+8+using+lamda+expressions

Functional interfaces introduces in java 8 . Functional interfaces will have single abstract method in it. Check here for full details on Java 8 functional interface with example. Functional... read more ?

Java 8 functional interface with example

functional+interface+example+in+java+8

Java 8 introduced Lamda expressions and functional interfaces. An interface with one abstract method is known as functional interfaces. Functional interfaces in java 8 marked with @FunctionalInterface. These functional... read more ?

Java 8 date add n seconds to current date example program

java+8+date+subtract+seconds++example+program

Java 8 providing java.time.LocalDateTime class. By using plusSeconds() method of  LocalDateTime we can add seconds to date. By Using minusSeconds() method we can substract  seconds from java date.... read more ?

Java 8 foreach example program

java+8+for+each+loop

Java 8 introduces for each loop. before that lest see an example of how normal java for each loop. #1: Java Example program which explain use of for... read more ?

Java 8 java.util.function.Function with example program

java+8+function+example

java.util.function.Function introduced in java 8 for functional programming. Function(T,R) will be used in streams where to take one type of  object and convert to another and return.  And... read more ?

How to subtract minutes from current time in java

subtract+minutes+from+java+date+time

We have discussed about how to subtract hours from java 8 using LoclaDateTime class in java. How to subtract N hours from current date time using java 8... read more ?

Java 8 Interface Static and Default Methods

java8int

Java 8 introduced two new methods in interface they are1.default methods2.static methods By this interfaces and abstract class are same but still having lot differences like abstract class... read more ?

8 New Java 8 Features

java88

Default and Static methods in Interface Lambda Expressions Optional Streams Method References Data Time API Nashorn Javascript Engine Parallel Arrays       1.Default and Static methods in... read more ?

Select Menu