Interview Questions
Search
Legacy
Tests
Repository
DashBoard
Java
Java 8
Java 7
Java Abbreviations
OCJP / SCJP
Class List
New in Java 8
Java Exceptions
Spring Exceptions
Java Enums
Java 8 Lambda
Java 8 java.time
Big Data
Discussion Forum
Humor
Classes Search
Subscribe
Search Java Code Snippets
Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.
Search
Submit Code Snippet
Java - Code Samples
Sample 1. Null or Empty String check using string length
String str= "";
if (str != null || str.length() != 0) {
// Do something
}
Like
Feedback
string
null check
String.length
check empty string
Correction
Suggestion
Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by
FeedBurner