MasterCard
Nwcc Supply Chain Solutions Interview Questions and Answers
Q1. Java program to find sum and multplication of int inp ex: 123 return sum and addition
Java program to find sum and multiplication of an integer input.
Use the modulus operator to extract each digit from the input integer.
Add the extracted digits to calculate the sum.
Multiply the extracted digits to calculate the multiplication.
Q2. Write java stream to find output JSON object is input contains State and filters ....> outout shoudl be resultant of both
Java stream to filter JSON object by State and other filters
Use Java Stream API to filter JSON objects based on State and other filters
Create a Predicate to filter the JSON objects based on the given filters
Use the filter() method of Stream to apply the Predicate on the JSON objects
Collect the filtered JSON objects using the collect() method of Stream
Q3. Routing how to use proxy
Routing through a proxy involves configuring the proxy server to forward requests to the destination server.
Configure the proxy server to listen for incoming requests
Configure the proxy server to forward requests to the destination server
Configure the client to use the proxy server for outgoing requests
Use a proxy server to bypass network restrictions or improve performance
Examples: Nginx, Apache, Squid
Q4. Explain Spring MVC structure
Spring MVC is a framework for building web applications in Java.
Model: Represents the data of the application
View: Represents the UI of the application
Controller: Handles the user input and updates the model and view accordingly
DispatcherServlet: Front controller that receives all incoming requests and routes them to the appropriate handler
RequestMapping: Annotation used to map web requests to specific handler methods
Q5. Explain java8 concepts
Java8 introduced new features like lambda expressions, streams, functional interfaces, and default methods.
Lambda expressions allow you to write more concise code by providing a way to pass functions as arguments.
Streams provide a way to work with sequences of elements and perform operations like filter, map, reduce, etc.
Functional interfaces are interfaces with a single abstract method, which can be implemented using lambda expressions.
Default methods allow interfaces to hav...read more
Q6. Internal working of hashmap
HashMap in Java is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
HashMap uses an array of buckets to store key-value pairs.
Keys are hashed to determine the index where the value will be stored.
In case of hash collisions, a linked list or a balanced tree is used to store multiple values at the same index.
HashMap allows null keys and values.
Example: HashMap<String, Integer> map = new HashMap<>(); map.put("key1", 1);
Interview Process at Nwcc Supply Chain Solutions
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month