"A" is not equal "A"?

2

245dav

I was trying to convert String Array to String A through cycle and than compare the result with String B but eventhough results were the same it returned false.
I'am working in BlueJ 3.1.0
Code is:
public boolean Method ()
{
String[] Example = {"a","b","c"};
String A = "";
String B = "abc"
for (int i = 0; i<3 ; i++)
{
A = A + Example;
}
if (A == B)
{
return true;
}
}
never got true...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top