Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

janhess
2012-05-02 12:49:45

According to your example in the code picture you want to return true or false.

Lmit
2012-05-02 11:58:16

Hi janhess

                  Thanks For your Replies..... your code will return a Boolean value but i want to return 0 or 1.


Thanks In Advance
LMIT

janhess
2012-05-02 10:09:06

You appear to have an error in isBlank.

    public static boolean isBlank(String str) {
    int strLen;
    if (str == null || (strLen = str.length()) == 0) {
    return true;
    }
    for (int i = 0; i < strLen; i++) {
    if ((Character.isWhitespace(str.charAt(i)) == false)) {
    return false;
    }
    }
    return true;
    }

pedro
2012-05-02 08:38:12

Hi Lmit

Sorry for my delay to answer.

Last time I imported routines.system.StringUtils. I think what you need is to import org.apache.commons.lang.StringUtils which contains isBlank() method.

Regards,
Pedro

Lmit
2012-04-30 06:38:15

Hi Pedro,

                Thank For your reply

isBlank() method is there in stringUtils which checks whether the string is whitespace, empty ("") or null.

the function of the method (which i want is)
I want to check whether is string is null or not.


Thanks,
Lmit

pedro
2012-04-27 12:16:19

Hi Lmit

What's the function of this method?

First, you forgot to import StringUtils.
Second, there is no isBlank() method in StringUtils.

Regards,
Pedro

Lmit
2012-04-27 12:10:05

Hi All,

            I want to use a method isBlank() in tmap, i have written the routine also but getting error... am attaching the screen shot of my code....

Can any one give a better solution for this..It could be a greatful

Thanks In Advance
Lmit

Board footer

Powered by FluxBB