Download our latest MNC Answers Application at Play Store. Download Now

Java Milestone Challenge Solution | TCS Fresco Play

Java Milestone Challenge Solution | TCS Fresco Play

Disclaimer: The primary purpose of providing this solution is to assist and support anyone who are unable to complete these courses due to a technical issue or a lack of expertise. This website's information or data are solely for the purpose of knowledge and education.

Make an effort to understand these solutions and apply them to your Hands-On difficulties. (It is not advisable that copy and paste these solutions).

All Question of the MCQs Present Below for Ease Use Ctrl + F with the question name to find the Question. All the Best!

Java Milestone Challenge Solution

import java.util.Arrays;

import java.util.List;

import java.util.Scanner;

import java.util.function.Function;

import java.util.function.Predicate;


 * Create the Filter and Mapper classes here.


 class Filter {

    public static Predicate<String> nameStartingWithPrefix(String prefix) {

        return n -> n.startsWith(prefix);



class Mapper {

    public static Function<String, CharactersCount> getDistinctCharactersCount() {

        return s -> new CharactersCount(s, (int)s.chars().distinct().count());



class CharactersCount {

    private final String name;

    private final Integer distinctCharacterCount;


    public CharactersCount(String name, Integer distinctCharacterCount) { = name;

        this.distinctCharacterCount = distinctCharacterCount;




    public String toString() {

        return "\"" + + "\" has " + this.distinctCharacterCount + " distinct characters.";



public class Solution {

    private static final Scanner scanner = new Scanner(;


    public static void main(String[] args) {

        List<String> names = Arrays.asList(























Credit for the above notes, goes to the respective owners. 

If you have any queries, please feel free to ask on the comment section.
If you want MCQs and Hands-On solutions for any courses, Please feel free to ask on the comment section too.

Please share and support our page!