954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

JText

if(jText.getText==" "){

}
//it will not Work & a Information is come up that "Comparing String using == ,!=".
So,what I do for this code please give me answer of this Question in java.

atul vishwakarm
Newbie Poster
1 post since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

lets say s0 ans s1 too String
wrting an instruction like this:
if(s0==s1)
this instruction compares the adress of too object of type java.lang.String s= and s1.
You have to use the equals method or equalsIgnoreCase method as follow:
if("".equals(jText.getText)){

}

moutanna
Posting Whiz
387 posts since Oct 2009
Reputation Points: 16
Solved Threads: 58
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You