Can i show any other word instead of "null" in an array ?
Xufyan
-4
Posting Whiz
Recommended Answers
Jump to PostSure, if it's an array of Strings. What sort of array have you got?
Jump to PostGet the value from the array into a String variable. Test if it is null and if so, set it to "No". Then pass that String to who ever wants the contents of the array at those index values.
Jump to Postit is not working
Can you explain?
I can NOT make comments on your code unless you post it.String test = anArray[1][5]; // get the element from the array if(test == null) // test if the element is null test = "No"; // change the value …
Jump to PostPlease clarify: Are you looking to change the underlying data, or simply the way you present it?
That is, do you want unassigned cells in the array to contain the value NULL or "No"?If you just want to change the output, when you're looping over the array to …
Jump to PostString DnP [][] = new String [9][5]; .... String test = DnP[9][5];
What is the maximum index value for the first dimension of the DnP array?
What is the value of the index causing this: ArrayIndexOutOfBoundsException: 9
Change this line to test for null before …
All 17 Replies
jon.kiparsky
326
Posting Virtuoso
Xufyan
-4
Posting Whiz
NormR1
563
Posting Sage
Team Colleague
Xufyan
-4
Posting Whiz
NormR1
563
Posting Sage
Team Colleague
jon.kiparsky
326
Posting Virtuoso
Xufyan
-4
Posting Whiz
NormR1
563
Posting Sage
Team Colleague
Xufyan
-4
Posting Whiz
NormR1
563
Posting Sage
Team Colleague
Xufyan
-4
Posting Whiz
NormR1
563
Posting Sage
Team Colleague
Xufyan
-4
Posting Whiz
NormR1
563
Posting Sage
Team Colleague
Xufyan
-4
Posting Whiz
NormR1
563
Posting Sage
Team Colleague
Xufyan
-4
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.