Blog Archives
Page 1 of 3
1 2 3

01: Coding “Java way in Scala” Vs “Scala way in Scala”

Example #1: Read from a list & write to a list Java Way in Scala



01: Q1 – Q6 Scala interview questions & answers – FP

100+ FAQ Scala interview questions answered with code. Learn more about FP – 6 tips to transforming your thinking from OOP/imperative programming to functional programming (i.e. FP). Scala is very …



02: Coding Scala Way – Recursion & Iterator in FP

This extends Coding Scala Way – Part 1 Example #4: FP using both recursion and functional combinator like foldLeft Can you write the following code written in Java the Scala way? …



02: Q6 – Q12 Scala FP currying, closures & partial functions interview Q&As

This extends Q1 – Q5 Scala Functional Programming basics interview questions & answers

Q6. What is a curried function in Scala?
A6. Currying is the technique of transforming a function with …



03: Coding Scala Way – Lazy Eval

Example #6: Lazy initialization & evaluation of code Scala support “views”, which are collections that can be lazily evaluated. One use for views is when you need to traverse a collection …



03: Q13 – Q18 Scala FP combinators interview questions & answers

Q13. What are the different approaches in Scala to solve the following task?

Given numbers 1 to 6, and you need to extract out the odd numbers and double them, and …



04: Coding Scala Way – Null checks with Option-Some-None

Example #10: Null checks with “Option-Some-None”

Nulls in Scala is a code smell, and a better way to handle null values is with an “Option“, which has 2 sub …



04: Q19 – Q26 Scala Data Structures basics interview questions & answers

Q19. What is the use of Tuples in Scala?
A19. A Tuple is an immutable collection that can hold objects of different types. In other words, it groups together logical …



05: Coding Scala Way – FP concepts

Example #13: Explain the concepts

Can you explain the Scala concepts applied in the following code snippets?



05: Q27 – Q32 Scala idioms Q&As on Option-Some-None, Try-Success-Failure and Either-Left-Right

Java has idioms like Try-Catch-Finally, Scala has idioms like 1) “Option-Some-None”, 2) Either-Left-Right 3) Try-Success-Failure.

Q27. How does Scala try to solve the problem of getting rid of null values & …



06: Coding Scala Way – Reduce & Compose functions

Example #14: Reduce operations Given a list of functions as shown below, how will you go about applying all the functions in the list to each input number and sum the …



06: Q33 – Q40 Scala Futures and Promises Interview Q&As

Q33. What is a “Future” object in Scala? Is it an immutable object? A33. A Future is a holder object that holds a value (i.e. success scenario) or an exception (i.e. …



07: Coding Scala Way – Regular Expressions

Example #16: Regular Expression Regular expression (aka regex) to identify numbers in a string. Invoking “findFirstIn” and “findAll” functions of the “Regex” class. “[0-9]+”.r is a short form instead of instantiating …



Page 1 of 3
1 2 3

800+ Java Interview Q&As Menu

Prepare to fast-track & go places
with multi-offers to choose from & increased earning potential. Expand your horizons along the way by taking the road less travelled.

Career Paths as a Developer

Learn by categories on the go...
Learn by categories such as FAQs – Core Java, Key Area – Low Latency, Core Java – Java 8, JEE – Microservices, Big Data – NoSQL, etc. Some posts belong to multiple categories.
Top