I wanna ask you , 
do you have a solution for this question (if statement) or where is the error ? 
String z = input.nextLine() ;  //i want from the user value of z  .
if (z ==( "Y" || "y" )) 
{  
    statement ... 
}     
else if (z==("N" || "n" ))    
{  
    statement ... 
}
How to write a condition for if when the condition of String in Java  ? 
 
     
     
     
    