[futurebasic] [X-FB] Java function

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1998 : Group Archive : Group : All Groups

From: Morrison SoftDesign <info@...>
Date: Mon, 28 Dec 1998 09:07:45 -0500
I am trying to get a simple Java applet (JDK 1.0) function to verify a serial
number. The function I'm using always returns false (or "INVALID").

Any ideas? Thanks...


	//assume "test" is a valid serial number string

	boolean validateSN(String theSN){
		boolean result = false;
		
		if (theSN == "test") {result = true;}
		else {result = false;};
		return result;
	}


...<snip>...

		if (validateSN(serialField.getText())) {serialField.setText("VALID");}
		else {serialField.setText("INVALID");};



John


-- 
Professional Font Software Utilities...

Morrison SoftDesign
http://www.MorrisonSoftDesign.com
1-800-583-2917