April 6, 2012

doesn't check for me?

Question by Fightpa Sirprite

i use split function

string = data.con_loop[i].split("\.");

string input is “0.9.L” when i check

if(string[2]=="L")

it doesn’t into statement in scope of if Why?

Answer by Starx

You don’t need double slashes, then use equals to check

string = data.con_loop[i].split(".");
if(string[2].equals("L")) {
    //.....
}

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!