Course Solutions Uncategorized (Solved) : Following Code Want Use Colorarray File Entered Use Random Colorarray Left Empty Get Error Q28170016 . . . .

(Solved) : Following Code Want Use Colorarray File Entered Use Random Colorarray Left Empty Get Error Q28170016 . . . .

 

I have the following code, and I want it to use the colorarrayfrom file, is it is entered, and use a random colorarray if it isleft empty. I get an error saying: Array constants can only be usedin initializers. Hope someone can help.

   private static int[][] colors;

String cFieldcolorField.getTextO; if (cField.equals()) -i 87 int red[] = new int [COLOR-1]; int greennew int[COLOR-1]; int bluenewint COLOR-11 Random random new Random(); for(int i = 0: i < COLOR-1; i++){ 89 90 91 92 93 94 95 96 97 98 redi -random.nextIntCOLOR-1: green [i] = random. nextInt(COLOR-1); bluerilrandom.nextInt(COLOR-1: colors = ?reg,..green blue ; } else l 100 101 colors = loadColors(cField); 102 103

Example

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post