2018-08-18 20:54:24 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								=========
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## Java Strings Cookbooks and Examples
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-12-20 10:19:27 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								### Relevant Articles:
  
						 
					
						
							
								
									
										
										
										
											2018-08-18 20:54:24 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [String Operations with Java Streams ](http://www.baeldung.com/java-stream-operations-on-strings ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Converting String to Stream of chars ](http://www.baeldung.com/java-string-to-stream ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Java 8 StringJoiner ](http://www.baeldung.com/java-string-joiner ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Image to Base64 String Conversion ](http://www.baeldung.com/java-base64-image-string ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								-  [Java –  ](http://www.baeldung.com/java-random-string ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Convert char to String in Java ](http://www.baeldung.com/java-convert-char-to-string ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Convert String to int or Integer in Java ](http://www.baeldung.com/java-convert-string-to-int-or-integer ) 
						 
					
						
							
								
									
										
										
										
											2018-12-20 22:02:28 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Java String Conversions ](https://www.baeldung.com/java-string-conversions ) 
						 
					
						
							
								
									
										
										
										
											2018-08-18 20:54:24 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Converting Strings to Enums in Java ](http://www.baeldung.com/java-string-to-enum ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Quick Guide to the Java StringTokenizer ](http://www.baeldung.com/java-stringtokenizer ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Count Occurrences of a Char in a String ](http://www.baeldung.com/java-count-chars ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Split a String in Java ](http://www.baeldung.com/java-split-string ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [How to Remove the Last Character of a String? ](http://www.baeldung.com/java-remove-last-character-of-string ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [CharSequence vs. String in Java ](http://www.baeldung.com/java-char-sequence-string ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [StringBuilder and StringBuffer in Java ](http://www.baeldung.com/java-string-builder-string-buffer ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Guide to Java String Pool ](http://www.baeldung.com/java-string-pool ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Check if a String is a Palindrome ](http://www.baeldung.com/java-palindrome ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Comparing Strings in Java ](http://www.baeldung.com/java-compare-strings ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Check If a String Is Numeric in Java ](http://www.baeldung.com/java-check-string-number ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Why Use char[] Array Over a String for Storing Passwords in Java?](http://www.baeldung.com/java-storing-passwords) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Convert a String to Title Case ](http://www.baeldung.com/java-string-title-case ) 
						 
					
						
							
								
									
										
										
										
											2018-09-07 16:56:13 +06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Compact Strings in Java 9 ](http://www.baeldung.com/java-9-compact-string ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Java Check a String for Lowercase/Uppercase Letter, Special Character and Digit ](https://www.baeldung.com/java-lowercase-uppercase-special-character-digit-regex ) 
						 
					
						
							
								
									
										
										
										
											2018-09-09 22:55:31 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Convert java.util.Date to String ](https://www.baeldung.com/java-util-date-to-string ) 
						 
					
						
							
								
									
										
										
										
											2018-09-15 22:08:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Get Substring from String in Java ](https://www.baeldung.com/java-substring ) 
						 
					
						
							
								
									
										
										
										
											2018-09-27 15:09:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Converting a Stack Trace to a String in Java ](https://www.baeldung.com/java-stacktrace-to-string ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Sorting a String Alphabetically in Java ](https://www.baeldung.com/java-sort-string-alphabetically ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Remove Emojis from a Java String ](https://www.baeldung.com/java-string-remove-emojis ) 
						 
					
						
							
								
									
										
										
										
											2018-10-13 02:22:56 +06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [String Not Empty Test Assertions in Java ](https://www.baeldung.com/java-assert-string-not-empty ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [String Performance Hints ](https://www.baeldung.com/java-string-performance ) 
						 
					
						
							
								
									
										
										
										
											2018-11-01 07:12:53 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Using indexOf to Find All Occurrences of a Word in a String ](https://www.baeldung.com/java-indexOf-find-string-occurrences ) 
						 
					
						
							
								
									
										
										
										
											2018-11-21 20:31:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Convert String to Byte Array and Reverse in Java ](https://www.baeldung.com/java-string-to-byte-array ) 
						 
					
						
							
								
									
										
										
										
											2018-11-09 04:23:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Java Base64 Encoding and Decoding ](https://www.baeldung.com/java-base64-encode-and-decode ) 
						 
					
						
							
								
									
										
										
										
											2018-11-18 22:55:50 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Generate a Secure Random Password in Java ](https://www.baeldung.com/java-generate-secure-password ) 
						 
					
						
							
								
									
										
										
										
											2018-11-25 16:05:39 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Removing Repeated Characters from a String ](https://www.baeldung.com/java-remove-repeated-char ) 
						 
					
						
							
								
									
										
										
										
											2018-12-01 07:10:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Join Array of Primitives with Separator in Java ](https://www.baeldung.com/java-join-primitive-array ) 
						 
					
						
							
								
									
										
										
										
											2018-12-06 22:57:24 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Convert String to Byte Array and Reverse in Java ](https://www.baeldung.com/java-string-to-byte-array ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Pad a String with Zeros or Spaces in Java ](https://www.baeldung.com/java-pad-string ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Adding a Newline Character to a String in Java ](https://www.baeldung.com/java-string-newline ) 
						 
					
						
							
								
									
										
										
										
											2018-12-20 22:02:28 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Remove or Replace part of a String in Java ](https://www.baeldung.com/java-remove-replace-string-part ) 
						 
					
						
							
								
									
										
										
										
											2018-12-28 00:05:55 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Replace a Character at a Specific Index in a String in Java ](https://www.baeldung.com/java-replace-character-at-index ) 
						 
					
						
							
								
									
										
										
										
											2018-12-28 16:11:16 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Convert a Comma Separated String to a List in Java ](https://www.baeldung.com/java-string-with-separator-to-list ) 
						 
					
						
							
								
									
										
										
										
											2018-12-30 16:30:36 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  [Guide to java.util.Formatter ](http://www.baeldung.com/java-string-formatter ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								-  [Add a Character to a String at a Given Position ](https://www.baeldung.com/java-add-character-to-string )