aspose file tools*
The moose likes Cattle Drive and the fly likes String array with null or  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "String array with null or  """" Watch "String array with null or  """" New topic
Author

String array with null or """

Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
Is there any difference between using null or "" in a String array? (Or null and the equivalent "empty element" in other array types?)
( String[ ] oneExample = { null , "1" , "2" } ) == ( String[ ] anotherExample = { "" , "1" , "2" } ) ?
thanks, Pauline
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089

Try it and see for yourself
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String array with null or """
 
Similar Threads
Array initialization while declaration
garbage collection
Anonymous Arrays
string array
Two and Three dimensional array