Help needed from Java geek

Status
Not open for further replies.

harshagarwal

Journeyman
this ones related to JAVA programming.

how in Java we can compare to strings.

I am making a small program in which i want to compare two strings.

please help.
 

Sourabh

Laptoping
wht are u talking abt??

is is regarding java or javascript??
man i know both but i learnt it 2 yrs back by myself so i dunn remember much
well i feel u want this in java
lol lemme recollect something

i guess its tht public static void main shit
then those curly braces {}
declaring statements



hmm but can u temme wht do u mean by comparing 2 strings??
i knw programs to check the given string is a palindrome or not n kinda stuff in java

like MALAYALAM n MALAYLAM :lol:
 
OP
H

harshagarwal

Journeyman
it is regarding Java.
I am actually making a word game similar to that comes in MID-DAY(a news daily in mumbai).

so in the game user tries to make english words out of given letters.
thus I want to compare the word enterd by user to that in the list(which i will prepare).
 

icecoolz

Cyborg Agent
harsh,

thats not too difficult. If you want to find out if two strings are equal then :

if(str.equals(str2))
{
//Do what you need to do here.
}
else
{

}

where str and str2 are two variable of the object String.

hope this helps.
 

xenkatesh

Bewitched!
hey! i dont know java but i can help u check java.sum.com and also javafile.com u can get some helps and tutorials there.
 
Status
Not open for further replies.
Top Bottom