Update API.java

Later: will change some methods.