Tag: functional interface
-
How to reverse each word in a sentence using StringBuffer class
This is the third solution to reverse each word in the given input sentence. This program uses the Single Abstract method, which implemented by using Lambda expression.
-
How to find sum of digits in an integer value
This is the second solution to find the sum of digits of an integer value[s]. This solution defines a functional interface with single abstract method with lambda expression. The internal core logic converts an integer value to String, then parse each character to digit, and sums up each digit.
-
How to find Nth largest number in an array
This is the second solution to find the Nth largest number from an array of given numbers. This program uses the Lambda expression, and the internal logic utilizes the sort method of the Arrays class.
-
How to find subsets of a given string
This is the third solution to list all the subsets or substrings of a given string. This approach uses functional interface with single abstract method implementation using lambda expression, the internal logic utilizes the String’s class substring method for intermediate processing of all sized sub strings.
-
How to count whether any number in an array repeated twice or thrice
This is the third solution to count whether any of the number in an array repeated twice or thrice from the same array of integers using functional interface and lambda expression.
-
How to find length of alpha numeric value or string
This is the second solution to find the length of an alpha numeric or string value, using functional interface and lambda expression without return statement. This approach uses direct String class length method.
-
How to find length of long integer value using String class
This is the second solution to find the length of a given long integer value with help of functional interface and lambda expression. The internal logic is same that is converting long to string, and apply length method.
-
How to find sum of digits in an alpha numeric value
This is the second solution to find the sum of digits from a given alpha numeric value by using a functional interface with single abstract method and lambda expression. Internally it uses String and Character class methods.
