3 Replies Latest reply: Mar 20, 2013 2:35 AM by gimbal2 RSS

    issue with the method

      I got a question in an interview

      what is wrong with the following code:

      printText(String text,boolean bold)

      Can someone through a light on it, this i snot related to syntax but approach
        • 1. Re: issue with the method
          I don't have an issue with it, but some people might claim that the method itself should decide about boldface. A typographer who hasn't been raised on advertising and Web pages would probably object to making boldface available as an option at all.

          It's not much of an interview question, unless maybe it was just intended to start a discussion, but I have a nasty feeling it was somebody's hobby-horse, and a box that needed ticking.
          • 2. Re: issue with the method
            I got a question in an interview
            And what was your answer?
            • 3. Re: issue with the method
              994896 wrote:
              printText(String text,boolean bold)
              Well what if you wanted it italic? Underlined? Strike through even?