Problem with the result of the implementation
Code:
import java.io.*;
public class Author{
public static void main(String[] args)throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader (System.in));
System.out.println("Welcome in Management Program");
System.out.println("Please, Enter your name: ");
String a = in.readLine();
if (a == "[COLOR="Red"]AhmedHello
It's my pleasure to join you in this forum
Actually, I'm new in programming by Java
Yesterady, I wrote this code
"){
System.out.println("Welcome Mr."+ a);
}else{
System.out.println("Wrong name !!");
}
}
}
The problem with the result of implementation
When I implement the program and enter the same name (Ahmed) , the result will be "Wrong name"
So, what do you think the problem is ?
I hope you can help me
My regards
:)[/COLOR]