Blog Archives
1 2 3 4 5 6 7

09: Coding Scala Way – Fibonacci Series

Example #22: Fibonacci series in Scala This extends determine the nth fibonacci number using Scala. In this let’s print the Fibonacci series of length n. Q1 Is the above approach to “print the Fibonacci series of length n” efficient? A1 No. … Read more ›...

Members Only Content
Log In Register Home


09: Q59 – Q65 Higher Order Functions in Scala Interview Q&As

Q59. What is a higher order function, and what is the purpose of higher order functions? A59. Higher-order functions are functions that take functions as parameters. This gives you opportunities to condense and simplify code. The most used methods in the entire Collection API like map, … Read more ›...

Members Only Content
Log In Register Home


10: Coding Scala Way – groupBy, mapValues & identity

Java developers need to learn Coding Scala Way. Scala way of coding is quite different & you need to unlearn Java way of coding

Question: Given a list of numbers, how will you group the numbers by how many times they occur? for example output for “List(3,

Read more ›



10: Q66 – Q70 Pattern matching in Scala Interview Q&As

Q66. What is the purpose of pattern matching in Scala? A66. It is for the “flow control“. Most imperative languages support “if-then-else”, case statements, and loops like while, for, foreach, etc. Scala does support some of these, but the most often used “ … Read more ›...

Members Only Content
Log In Register Home


11: Coding Scala Way – Actors with Akka – part 1

We already saw in Java: Producer and Consumer Java Multi-threading code. This extends the tutorial “Simple Akka tutorial in Scala step by step” for setting up the environment with right plugins and libraries with Eclipse & Maven.

The Akka Actors sending &

Read more ›



11A: Scala values, proper types, first order types & higher kinded types

Q1. What is a proper type in Scala? A1. String, List[Int], List[String], Person, etc are proper types in Scala. The below diagram will become clearer at the end. Proper types are a higher level concept than values (E.g. … Read more ›...

Members Only Content
Log In Register Home


11B: Q71 – Q77 – Scala type Parameterization & variance interview Q&As

Q71. What is type Parameterization? A71. Type Parameterization allows you to write generic classes. For example, a List[T] is a generic type and take a type parameter of “T”, which can be a String, Integer, Double, Animal, or any other user defined class types. … Read more ›...

Members Only Content
Log In Register Home


1 2 3 4 5 6 7

800+ Java Interview Q&As Menu

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, Architecture – Distributed, Big Data – Spark, etc. Some posts belong to multiple categories.
Top