Skip to content

mkyong.com

  • Spring Boot
  • Java Virtual Threads
  • Contact
  1. Home /
  2. replace

Tag: replace

j
java October 25, 2024 2 min read by mkyong 0 comments

How to Replace Spaces with Dashes in Java

We can use the Java String built-in `replace()` or `replaceAll()` methods to replace spaces with dashes (`-`) easily.

Read more How to Replace Spaces with Dashes in Java

Recent Posts

  • Java Compact Source File: No Class, No Static Main
  • Java Scoped Values Example
  • Spring Boot RAG Example with Spring AI
  • Java AtomicInteger Example
  • Java Virtual Threads Example
  • Spring Boot Supabase CRUD Example
  • Spring Boot REST Docs Example
  • How to Install Java on Windows (Step-by-Step Guide)

© 2008–2026 mkyong.com

  • About
  • Editorial Policy
  • Contact
  • Code License
  • Privacy Policy
  • Terms of Use