Java Snippet if and

Hello all.
I’m try write some code in Java Snippet to have message popup at the end of execution. from my POV everything looks fine, but… even firs statement true - each time message show me second.

 if ( c_RTCQAStatus=="RL" &&   c_RTCISQUANTY == c_SAPUnrestricted && c_SAPLE==c_RTCISLE && c_RTCISLE=="A709")

//if (c_Status=="OK")
{
 
	JOptionPane.showMessageDialog
	(null,"Все ОК! " + "\n" +   "LE: RTCIS -" + c_RTCISLE + " , SAP-" + c_SAPLE +   "\n" + "RTCIS " + c_RTCQAStatus + " - " +  c_RTCISQUANTY +   "\n" + " SAP RL - " + c_SAPUnrestricted +   "\n" + " SAP QU - " + c_SAPInQualityInsp  +   "\n" + " SAP BL - " + c_SAPBlocked  , "Warning!", JOptionPane.INFORMATION_MESSAGE);
	}	
	else	
  {
	JOptionPane.showMessageDialog
		(null,"Что то пошло не так! " + "\n" +   "LE: RTCIS -" + c_RTCISLE + " , SAP-" + c_SAPLE +   "\n" + "RTCIS " + c_RTCQAStatus + " - " +  c_RTCISQUANTY +   "\n" + " SAP RL - " + c_SAPUnrestricted +   "\n" + " SAP QU - " + c_SAPInQualityInsp  +   "\n" + " SAP BL - " + c_SAPBlocked  , "Warning!", JOptionPane.ERROR_MESSAGE);
	}

The problem is the ==:

5 Likes

Thank you very much, now it works as expected with equals :wink:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.