Learn how to check if a number Is a power of two in Scala.
Also find me here:
Baeldung Author
Yadu Krishnan
I am a software developer with over a decade of experience in building complex systems. My passion for functional programming led me to specialize in Scala. I am always eager to learn new languages, libraries, and technologies to expand my knowledge and abilities. When I'm not coding, I love exploring new places and cultures through solo trips and walks, which helps me to unwind and recharge.
Here's what I've written (so far):
Baeldung on Scala
- All
- Testing (8)
- Scala Basics (7)
- Build Tools (7)
- Libraries (6)
- Scala Collections (5)
- Functional Programming (5)
- Scala Numbers (4)
- Scala Strings (3)
- Scala Core (3)
- Scala Concurrency (3)
- Scala Exceptions (2)
- Akka (2)
- Scala IO (1)
- Scala Dates (1)
Capitalizing Every Word in a Sentence in Scala
Filed under Scala Strings
Learn how to capitalize every word in a sentence in Scala.
Find Factorial of a Number in Scala
Filed under Scala Basics, Scala Numbers
Learn how to find the factorial of a number in Scala.
Difference Between zip() and lazyZip() in Scala
Filed under Scala Collections
Learn the difference between zip() and lazyZip() in Scala.
Check if a Collection Is Sorted in Scala
Filed under Scala Collections
Learn different ways to check if a collection Is already sorted in Scala/
Guide to Parameterized Tests in ScalaTest
Filed under Testing
Learn how parameterized tests work in ScalaTest.
Generating the Fibonacci Sequence in Scala
Filed under Scala Basics
Learn various ways of generating the Fibonacci sequence in Scala.
Check if a Number Is Prime in Scala
Filed under Scala Numbers
Learn how to check if a number is prime in Scala
Generate Secure Random Passwords in Scala
Filed under Scala Strings
Learn how to generate secure random passwords with various criteria.
Generate an Acronym for a Given String in Scala
Filed under Scala Strings
Learn how to generate an acronym for a given string in Scala
Check if a Number Is Magic Number in Scala
Filed under Scala Numbers
Learn how to check if a number is a magic number in Scala.
Test for Exceptions in ScalaTest
Filed under Scala Exceptions
Learn how to test for exceptions in ScalaTest.
Generate List of Dates Between a Range in Scala
Filed under Scala Dates
Learn how to generate a list of dates between the endpoint dates in a range.
Introduction to Scala-CLI
Filed under Build Tools, Scala Basics
An introduction to Scala-CLI.
Using the sliding() and grouped() Methods With Scala Collections
Filed under Scala Collections
Learn how to use the the sliding() and grouped() methods with Scala collections.
Different Ways to Selectively Run Tests With SBT
Filed under Build Tools, Testing
Learn different ways to selectively run tests with SBT.
Different Ways to Filter Elements From a Scala Collection
Filed under Scala Collections
Learn several ways to filter elements from a Scala collection.
Repeat and Retry in ZIO
Filed under Scala Concurrency
Learn how to repeat and retry with ZIO.
Code Coverage Analysis Using sbt-scoverage
Filed under Build Tools, Testing
Learn how to do code coverage analysis using sbt-scoverage.
Creating Aliases in SBT
Filed under Build Tools
Learn how to create aliases with SBT, Scala’s Build Tool.
locally Block In Scala
Filed under Scala Core
Learn about the locally Block in Scala.
Introduction to the @threadUnsafe Annotation in Scala 3
Filed under Scala Concurrency
Learn how to use the @threadUnsafe annotation in Scala 3..
Difference Between NonFatal and Exception in Scala
Filed under Scala Exceptions
Learn the difference between NonFatal and Exception in Scala.
Export Clause in Scala 3
Filed under Scala Basics
Learn how to use the Export Clause in Scala 3.
Comparing Scala REPL, SBT console, and SBT consoleQuick
Filed under Build Tools
Explore Scala REPL, SBT console, and SBT consoleQuick.
Difference Between tell and forward in Akka Actor
Filed under Akka
Learn the difference between the tell() and forward() methods of Akka Actors.
Writer Monad in Cats
Filed under Functional Programming
Learn how to use the writer monad in Cats.
Logging in Scala Applications Using Scala-Logging
Filed under Libraries
Learn how to do logging in Scala Applications Using Scala-Logging
Introduction to Akka HTTP in Scala
Filed under Akka
Learn how to use Akka HTTP in Scala.
@targetName Annotation in Scala 3
Filed under Scala Basics, Scala Core
Learn how the @targetName annotation work in Scala 3.
Transparent Traits in Scala 3
Filed under Scala Basics
Learn transparent traits work in Scala 3
Setting up Global Configurations in SBT
Filed under Build Tools
Learn how to setup up Global Configurations in SBT.
Introduction to uTest
Introduction to uTest Scala Unit Testing Framework.
Resource Handling in ZIO
Filed under Functional Programming, Scala IO
Learn how to manage resources with ZIO.
Difference Between flatMap(), flatTap(), evalMap() and evalTap() in Cats Effect
Filed under Functional Programming
Explore the Cats Effect library.
Product With Serializable in Scala
Filed under Scala Basics
Learn abour some type inference issues with ADTs and how they can be solved.
Introduction to Lightbend Config
Filed under Libraries
Learn about the popular configuration management library for Scala – Lightbend Config.
Introduction to MUnit
Filed under Testing
Discover how to get started with MUnit for unit testing Scala code
Using the ScalaTest Runner
Filed under Testing
Discover how to use the ScalaTest Runner
Resource Handling in Cats Effect
Filed under Functional Programming
Learn about resource handling in Cats Effect.
Difference Between delay, defer, and deferred in Cats Effect
Filed under Functional Programming
Learn the difference between delay, defer, and deferred in Cats Effect.
Introduction to Concurrent Programming With Cats Effect Fibers
Filed under Scala Concurrency
Learn about concurrent programming with Cats Effect Fibers.
Scala App Configurations With Clarity Using ClearConfig
Filed under Libraries
Lear to manage Scala application configurations with ClearConfig.
Nested Functions in Scala
Filed under Scala Core
Learn about nested functions in Scala.
Building Native Applications in Scala Using Scala Native
Filed under Libraries
Learn to build native applications in Scala using Scala Native.
Comparing Collection Contents with ScalaTest
Filed under Scala Collections, Testing
Learn to compare the contents of a collection using ScalaTest.
Load Configuration Files In Scala Using PureConfig
Filed under Libraries
Lear to Load configuration files in Scala using PureConfig.
Using ScalaTest With Mockito
Filed under Testing
Learn to use ScalaTest with Mockito.
Different Ways to Package a Simple Scala Application
Filed under Build Tools
Learn about different ways to package a Scala application.