aspose file tools*
The moose likes Java in General and the fly likes Duplicate print lines but I only want it once Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Duplicate print lines but I only want it once

Lisa Beglaw
Ranch Hand

Joined: Jul 16, 2005
Posts: 65


If I have two movies, none of which are rented out, I get...
Total number of movies = 2
Of those movies 0 are currently rented out.
Total number of movies = 2
Of those movies 0 are currently rented out.

If I have three movies, the third one being rented out, I get...
Total number of movies = 3
Of those movies 0 are currently rented out.
Total number of movies = 3
Of those movies 0 are currently rented out.
Total number of movies = 3
Of those movies 1 are currently rented out.

How do I get my metod to print:
Total number of movies = 3
Of those movies 1 are currently rented out.

(Mabye I should re-think the wording of the rented out line...)
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

Answered here.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Duplicate print lines but I only want it once