Hi, probably there are some typos in the explanation: there is Savepoint interface, not SavePoint, and there is Connection.setSavepoint method, not Connection.setSavePoint:
The SavePoint feature of JDBC is tailor made for this purpose.
and
SavePoint savePoint1 = connection.setSavePoint("step1done");
Additionally: comments could be changed from \\1 and \\2 (now they don't compile) to //1 and //2 respectively in:
stmt.executeUpdate("update student set status=1"); \\1
[...]
stmt.executeUpdate("update student set gpa=4.0"); \\2