Section E.11. Declaring Methods

   

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(); 

   
Top


Java for ColdFusion Developers
Java for ColdFusion Developers
ISBN: 0130461806
EAN: 2147483647
Year: 2005
Pages: 206
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net