E.11. Declaring Methods
This example declares a method called setQuantity that accepts a variable called qty of type int.
public void setQuantity(int qty);
This example declares a method called getQuantity that returns a variable of type int.
public int getQuantity();
Get Java™ for ColdFusion® Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.