Learn how to check if a string contains a number in Java.
Also find me here:
Baeldung Author
Abderrahim Azhrioun
Full Stack Developer, Java Geek, Spring Lover, and a Blogger. I believe coding should be fun and accessible to everyone ;)
Here's what I've written (so far):
Baeldung on Java
- All
- Java Dates (9)
- Java String (8)
- JPA (7)
- Java IO (6)
- Spring Boot (4)
- Persistence (4)
- Spring Data (3)
- Java List (3)
- Jackson (3)
- Spring Web (2)
- Spring MVC (2)
- Java Streams (2)
- Java Collections (2)
- Java (2)
- Core Java (2)
- Spring Persistence (1)
- REST (1)
- Java Map (1)
- Java Array (1)
- JSON (1)
- HTTP Client-Side (1)
Capitalize the First Letter of Each Word in a String
Filed under Java String
Learn how to capitalize the initial character of each word in a Java string.
Convert Char Array to Int Array in Java
Filed under Java Array
Explore how to convert a char array to an int array in Java.
Converting HashMap Values to an ArrayList in Java
Explore several ways to convert a HashMap to an ArrayList in Java.
Getting Yesterday’s Date in Java
Filed under Java Dates
Learn how to easily get yesterday’s date in Java.
How to Get Last Day of a Month in Java
Filed under Java Dates
Discover how to find the last day of a month in Java using both core Java methods and popular libraries. This article provides step-by-step explanations for accomplishing the task using Date and Calendar classes, Java 8’s Date Time API, and the Joda Time library with code examples and test cases.
Adding One Month to Current Date in Java
Filed under Java Dates
In this short tutorial, we discuss various methods of adding one month to the current date in Java. We cover using core Java methods as well as popular external libraries such as Joda-Time and Apache Commons Lang3.
Difference Between findBy and findOneBy in Spring Data JPA
Filed under Spring Data
This article delves into the similarities and differences between the findBy and findOneBy prefixes in Spring Data JPA. It explores the concept of derived query methods, provides code examples, and explains the exception thrown by findBy queries when the result size doesn’t match expectations.
Handle NoSuchElementException When Reading a File Through Scanner
Filed under Java IO
In this tutorial, we’ll explore handling the ‘NoSuchElementException: No line found’ exception when reading a file using the Scanner class in Java. We’ll explain its root cause and present three solutions: defensive programming, exception handling, and checking file emptiness.