arduino with fingerprint

I connect the serial
I make the program as follows:

#include <NewSoftSerial.h>
byte query[24] = {
  0x55, 0xAA, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x01};

#define rxPin 2
#define txPin 3

NewSoftSerial fingerprint( rxPin, txPin );

void setup() {
  Serial.begin(115200);
  fingerprint.begin(9600);
}

byte val;
int i ;
void loop() {
  for (i=0 ; i<24 ; i++){
    fingerprint.print(query[i]) ;
  }
  delay(50);
  while(fingerprint.available()>0){
    val=fingerprint.read();
    Serial.print(val, HEX);
    Serial.print(" ");
  }
  delay(1000);
  Serial.println("--");
}

but the fingerprint does not give any reply.
whether serial.print serial.write replaced with?

Moderator edit: [code] ... [/code] tags added. (Nick Gammon)