arrays - erro java, cannot find symbol -


well, i'm new in , dont know how can make program works, need write program calculates , returns sum of components of vector squared

and got error:

import java.util.*; public class cuadrado {      public static void main(string[] args)      {            scanner teclado= new scanner (system.in);         int n=0,i=0,y=0;                 system.out.println("ingrese el valor de el vector");          n=teclado.nextint();          int[ ]suma=new int[n];          for(i=0;i<suma.lenght;i=i+1);         {             system.out.println("ingrese el valor de un numero");             suma[i]=teclado.nextint();             y+=suma[i];             system.out.println(""+y);                    }       } } 

cannot find symbol in line 16

remove ; end of line for(i=0;i<suma.lenght;i=i+1);

edit

also, @ankur-singhal said, suma.length instead of suma.lenght (nice catch).


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -