Learn how to perform an action only if all optionals are available.
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 Java
- All
- Java Numbers (2)
- Java String (1)
- Java (1)
Get 2’s Complement of a Number in Java
Filed under Java Numbers
Learn how to get the 2’s complement of a number in Java.
Exploring Complex Number Arithmetic Operations in Java
Filed under Java Numbers
Learn how to perform complex-number operations in Java.
Get the Initials of a Name in Java
Filed under Java String
Learn how to get the initials of a name in Java.
Baeldung on Scala
- All
- Testing (9)
- Scala Collections (7)
- Build Tools (7)
- Scala Numbers (6)
- Scala Basics (6)
- Libraries (6)
- Scala Strings (5)
- Functional Programming (5)
- Scala Core (3)
- Scala Concurrency (3)
- Scala Exceptions (2)
- Akka (2)
- Scala Type System (1)
- Scala Syntax (1)
- Scala IO (1)
- Scala Dates (1)
Meaning of _root_ In Scala Import Clause
Filed under Scala Syntax, Scala Type System
Learn the meaning of _root_ in Scala import clauses.
Convert Option to Either in Scala
Filed under Scala Basics
Learn how to convert Option to Either in Scala.
Using filter() and takeWhile() With Collections in Scala
Filed under Scala Collections
Learn how to use filter() and takeWhile() with collections in Scala.
Ignore Tests Conditionally in ScalaTest
Filed under Testing
Learn how to ignore tests conditionally in ScalaTest.
zip(), zipAll(), and zipWithIndex() Methods in Scala
Filed under Scala Collections
Learn how to use the zip(), zipAll(), and zipWithIndex() methods in Scala.
Remove Special Characters From a String in Scala
Filed under Scala Strings
Learn how to remove special characters from a string in Scala.
Get the Individual Digits of a Number in Scala
Filed under Scala Numbers
Learn how to get the individual digits of a number in Scala.
Check if a String Is a Palindrome in Scala
Filed under Scala Strings
Learn how to check if a string Is a palindrome in Scala.
Check if a Number Is a Power of Two in Scala
Filed under Scala Numbers
Learn how to check if a number Is a power of two in Scala.
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 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 Numbers
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.
Baeldung on Computer Science
- All
- Software Architecture (1)
Lexicographically Sortable Identifiers Using ULID
Filed under Software Architecture
Learn to generate identifiers whose lexicographic order preserves the order in which they’re created.
Baeldung on Kotlin
- All
- Kotlin Collections (3)
- Kotlin Numbers (2)
- Kotlin Strings (1)
- Kotlin Dates (1)
- Kotlin Basics (1)
- Algorithms (1)
Use of Backticks in Kotlin
Filed under Kotlin Basics
Quick tutorial on using backticks in Kotlin.
Guide to Duration in Kotlin
Filed under Kotlin Dates
Quick tutorial on how to handle time with the Duration class in Kotlin.
Difference Between eachCount() and eachCountTo() Methods in Kotlin
Filed under Kotlin Collections
Quick tutorial for the aggregation operations eachCount() and eachCountTo() in Kotlin.
Extract Numbers From a String in Kotlin
Filed under Kotlin Numbers, Kotlin Strings
Learn how to extract numbers from a Kotlin string.
Convert Double to String Removing Scientific Notation
Filed under Kotlin Numbers
A quick and practical guide to converting Double to String while removing scientific notation.
Convert Array to Set and Vice-Versa in Kotlin
Filed under Kotlin Collections
In this tutorial, we look at different ways to convert between an array and a set in Kotlin.
any() vs. none() vs. all() in Kotlin
Filed under Kotlin Collections
Learn about the all(), none(), and any() collection methods that enable concise and declarative condition checking.
Check if a Number Is Prime in Kotlin
Filed under Algorithms
A quick and practical guide to checking if a number is prime in Kotlin.
Baeldung on SQL
- All
- SQL Queries (5)
- SQL Tables (2)
- SQL Functions (1)
Get Current Timestamp in SQL Server
Filed under SQL Functions
Quick tutorial on various methods to obtain the current timestamp in SQL Server.
How to Use Condition in Count in SQL
Filed under SQL Queries
Learn how to use conditions in COUNT().
Find Null or Empty Values in SQL
Filed under SQL Queries
Learn how to select rows with NULL, empty strings, or both types of values.
Identifying Tables Containing a Specific Column Name
Filed under SQL Queries, SQL Tables
Explore how to find the tables that include a particular column name.
Retrieve All Table Names From a Specific Database Using SQL
Filed under SQL Queries, SQL Tables
Explore various ways to retrieve the table names within a specific database.
How to Select Rows in SQL Where a Column Contains Specific Words
Filed under SQL Queries
Learn how to find the rows where a column contains the given string.