arraylist - Java - Cannot find symbol? -


i've practicing little here can't figure out. declared arraylist ns cannot found: error: cannot find symbol ns.add(aa); why? sure don't see obvious.

import javax.swing.*; import java.awt.*; import java.awt.image.*; import java.awt.event.*; import java.util.random; import java.util.*; import java.io.*;   public class pixels6 extends jframe {    static java.util.list ns = new arraylist();   class paintingcomponent extends jpanel {     public void paintcomponent(graphics g)     {         super.paintcomponent(g);         setbackground(color.black);     }  }   public static void main( string[] args ) throws interruptedexception, ioexception  {      try     {             fl = new fileinputstream("test_for_java2.s8");             aa = fl.read();       javax.swing.timer swtimer = new javax.swing.timer( 10, new actionlistener()     {         public void actionperformed(actionevent ae)         {                            if (aa!=-1)             {                 aa -= 128;                   aa = -aa;                  ns.add(aa);                 try                      {aa=fl.read(); }                     catch( ioexception e )                 {                        system.out.println( "access denied: " + e );                     system.out.println( e );                 }               }             else    try                      {fl.close();}                  catch( ioexception e )                 {                     system.out.println( "access denied: " + e );                     system.out.println( e );                 }          } /// action      }); /// timer     swtimer.start();      } //try      catch( ioexception e )         {             system.out.println( "access denied: " + e );             system.out.println( e );         }       swingutilities.invokelater( new runnable()     {         public void run()         {             new pixels6().setvisible(true);         }     });  } /// main  } /// pixels6 extends jframe 

change to

ns.add(aa);  //not ns.add(aa); 

java case sensitive language


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -