Scala Online Test

TestDome skill assessments are used by more than 5,000 companies and 450,000 individual test takers.

Jobseekers: Get a Certificate

Take a Practice Test

Companies: Try First, Pay Later

Sign Up To Use This Test

The Scala online test assesses candidates' knowledge of programming in the Scala language and their ability to leverage commonly used parts of the Scala and Java frameworks' class library.

It's an ideal test for pre-employment screening. A good Scala developer needs to be able not only to solve problems using Scala but also recognize when to leverage the functionality provided by the frameworks' class library to write robust and maintainable code.

This online test requires candidates to solve coding problems in Scala and find and fix bugs in a Scala program.

Recommended Job Roles
Back-End Developer
Scala Developer
Web Developer
Sample Candidate Report

Sample Free Questions

Merge Names


Scala Vector Public New

Implement the uniqueNames function. When passed two vectors of names, it will return a vector containing the names that appear in either or both input vectors. The returned vector should have no duplicates.

For example, calling MergeNames.uniqueNames(Vector("Ava", "Emma", "Olivia"), Vector("Olivia", "Sophia", "Emma")) should return a vector containing Ava, Emma, Olivia, and Sophia in any order.

Player Inventory


Scala Bug fixing Immutability Immutable vector Public New

The code for the PlayerInventory class is not working. When a user starts a new account, PlayerInventory is initialized with basic items. It should also be possible to add and drop items from the inventory, with duplicate items added and removed separately.

For example, if "lumber" was added to the inventory and "stone" was removed, getItems() should return a Vector containing "lumber", "magic potion", and "lumber", in any order.

Fix the bugs.

User Input


Scala Inheritance OOP Public New

User interface contains two types of user input controls: TextInput, which accepts all characters and NumericInput, which accepts only digits.

Implement the class TextInput that contains:

  • Public method def add(c : Char) - concatenates the given character to the current value
  • Public method def getValue: String - returns the current value

Implement the class NumericInput that:

  • Inherits from TextInput
  • Overrides the add method so that each non-numeric character is ignored

For example, the following code should output "10":

val input: TextInput = new NumericInput()
Use Free Questions On a Trial Plan

Premium Questions

The premium question library contains our unique, hand-crafted questions. We offer a refund if you find any of them answered online.

Read First Line, Numbers To Text, Weighted Average, Language Teaching, Prefix
Scala Exceptions Strings Arithmetic Bug fixing Inheritance OOP Lazy Evaluation LazyList
Score Distribution
# of candidates
Pricing For Premium Questions