Trying to a dynamic sql statments

I am trying to execute multiple statments within a jdbc dynamic call. What do i put at the end of one statment to declare that particular statment is finished.

example:

insert into test (first,last) values (‘Joe’,‘Black’);
insert into test (first,last) values (‘Sally’,‘Sue’);
commit;

Would BatchInsert be a better template to use?