1.创建接口UserDao: package com.huida.demo1; public interface UserDao { public void save(); public void update(); } 2.创建实现接口的类UserDaoImpl: package com.huida.demo1; public class UserDaoImpl implements UserDao { @Override public void save() { System.out.pri…