my dog learned polymorphism
The moose likes Cattle Drive and the fly likes if Statements the best? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "if Statements the best?" Watch "if Statements the best?" New topic

if Statements the best?

Nath Maniedeo

Joined: Feb 15, 2008
Posts: 29
hi- I'm working figuring out a way to do what the teachers told me to do...I still need a further hint:

I'm trying to Check how many of a particular name will fit on a line of max 80 characters (after already getting the length of the name) for Assignment 1B

all I can think of are a bunch of IF statements and maybe something with the % operator.

(thank you teachers for helping before and now.)
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9058
How about dividing the length of the line by the length of the name?

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Nath Maniedeo

Joined: Feb 15, 2008
Posts: 29
yes, I'm doing that...I've made some progress in trying things, I think I just need to figure out how to print the right thing now...I'll get back to you with a more defined question later if need be...thank you so much!
I agree. Here's the link:
subject: if Statements the best?
jQuery in Action, 3rd edition