title: Drawing X and Y axis using loops and strings
body: <p>I have this programming assignment which is very specific. I need to draw an x and y axis only using loops and if else statements, and the method it is in can only return strings, either of the axis characters, like |, or of an empty string, "". I have it almost correct, but I cannot understand why the y axis is not printing at x==0, but at x== -10. I would love a hint about how to fix this, I am sure it is something small I have overlooked. It does work it I return " " instead of "", but I am not allowed to do that. Thanks!</p>
  
  <pre><code>public class Try1 {
  public static void main(String[] args) {
  
    int height = 10;
    int width = 10; 
  
    for (int y = height; y &gt;= -10; y--){
     for (int x = -10 ; x &lt;= width; x++){
       DrawAxis(x,y);
       System.out.print(DrawAxis (x,y));
  
     }
     System.out.print("\n");
    }
  
  }
  
  
  
  
   public static String DrawAxis(int x, int y)
   {
     if (x == 10 &amp;&amp; y == 0)
        return "&gt;";
     else 
       if (x == 0 &amp;&amp; y == 10)
        return "^";
     else 
       if (x == 0 &amp;&amp; y == 0)
         return ".";
     else 
        if (x == 0 &amp;&amp; y &gt;= -10)
          return "|";
     else
       if ( x &gt;= -10 &amp;&amp; y == 0)
        return "-";
  
  return "";}
   }
  </code></pre>