Vik
Vik

Reputation: 11

How to assign "Null" as a value to a string variable in Java

I am trying to import users from Active directory and in one of the cases, the user has a last name as Null. Can I have some pointers as to how should I take this one down?

Upvotes: 0

Views: 9052

Answers (2)

nfechner
nfechner

Reputation: 17525

That should be no problem, since it will be read as a String with the value "Null" not null.

Upvotes: 3

SLaks
SLaks

Reputation: 887315

There is nothing special about the string "Null"; you can use it normally.

Upvotes: 2

Related Questions