empty : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

empty

A zero-length String. i.e. x.length() == 0, e.g. "". If the empty String is interned, you can detect it with:

if ( x == "" )

If not, you can detect them with:

if ( x == null || x.length() == 0 )

One of the most common sources of error in Java programs comes from confusing the three different flavours of void Strings: blank, empty and null.


This page is posted
on the web at:

http://mindprod.com/jgloss/empty.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\empty.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.191.200.114]
You are visitor number