Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public void calculateTotal(){
  2. for(int c = 0; c < shirts.length; c++ ){
  3. if(shirts[c] != null){
  4. totalPrice += shirts[c].price;
  5. }
  6. }
  7. }
  8.  
  9.  
  10. public void calculateTotal(){
  11. for (Shirt shirt : shirts) {
  12. if (shirt != null) {
  13. totalPrice += shirt.price;
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement