title: Using a class as library
body: <p>I'm doing lately so much C++ that I forgot how to use Java. I'm confused with the includes of C++ what Java doesn't have. I've googled but always finds something like import but that doesn't work and making an object but this isn't possible because it's a library.</p>
  
  <p>I've got a class A : with something like this:</p>
  
  <pre><code>class Library
  {
    int findMaximum(int [] table)
    {
      int max = 0;
  
      for( int i = 0; i &lt; table.length; i++)
      {
        if( table[i] &gt; max )
          max = table[i];
      }
      return max;
    }
  }
  </code></pre>
  
  <p>and so much more functions.</p>
  
  <p>And I've got a class B:</p>
  
  <pre><code>class Tdd_1{
  
    static boolean test1(){
  
    int [] table = new int[20];
  
    for(int i = 0; i &lt; table.length; i++)
      table[i] = (int)(Math.random()*100)+1;
  
    findMax(table);
  
    return true;
    }
  }
  </code></pre>
  
  <p>Now I can't use findmax in that class? How can I fix this? The files are in the same dir?</p>
  
  <p>Then eventually the purpose is to have one main file like:</p>
  
  <pre><code>  public static void main(String[] args)
    {
  
      System.out.println("Test 1: \n");
      if(test1())
        System.out.println("Passed.\n");
      else
        System.out.println("Failed.\n");
    }
  </code></pre>
  
  <p>where I can run test1 and all the others....</p>
  
  <p>Can someone help me?</p>
  
  <p>Kind regards;</p>
  
  <p>What is a test case where I can </p>