non-static method cannot be referenced in static context
<p>I researched this around and still can't seem to solve this problem.  I have the following in my program:</p>

<pre><code>   public void InsertDB(double price, double shares, String ticker, int id)throws Exception {
   //do some stuff
   }
</code></pre>

<p>I tried the following within my main class(and got the above error non-static method cannot be referenced in static context):</p>

<pre><code>InsertDB(constants[i], variables[i], ticker[i], count);
</code></pre>

<p>Then I read you must create a new instance so I tried(Testingground is the name of my program) and I get an error saying it cannot find the InsertDB symbol:</p>

<pre><code>Testingground myObject = new InsertDB();
</code></pre>

<p>I'm new to java and kind of inherited this program(I haven't had this problem with my programs), can someone tell me what I can do to get this to work and the logic behind it?(my insertdb class gives me errors if I turn it to static so that approach won't work). I also read that it might work if I changed <code>public</code> to <code>protected</code> but it still didn't work.</p>

<p>Thanks in advance </p>
