title: Is it considered bad practice to return strings for functions you would typically return void?
body: <pre><code>class Main {
  
    public static int total = 5;
  
    public static void main(String[] args) {
      addToTotal(5);
      addToTotal(199);
      System.out.println(addToTotal(1));
    }
  
    public static String addToTotal(int amount){
      total += amount;
      return "Successfully added " + amount + " to total for result of " + total;
    }
  }
  </code></pre>
  
  <p>For instance, take this program that adds to the class total. It normally wouldn't need a return statement - but to me it seems like having it return a string for what happened seems like it would help with debugging complex problems. Is this considered bad practice?</p>