eclipse - Keep getting error in JAVA -


i keep getting error:

exception in thread "main" java.lang.error: unresolved compilation problem:  @ test.apples.main(apples.java:6) 

my code is:

import java.util.random;  class apples {     public static void main(string args[]) {            random rand = new random();           int freq[]=new int[7];            for(int roll=1;roll<1000;roll++) {               ++freq[1+rand.nextint(6)];            }            system.out.println("face\tfrequency");            for(int face=1;face<freq.length;face++) {               system.out.println(face+"\t" +freq[face]);           }        }     } 

you have add package test; @ top of class, clean , rebuild code.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -