You would appear to have used the code tags correctly, but the code isn't formatted correctly. It also isn't correct to make everything static as you have done. It is usually better to use a Random instance than to try arithmetic on Math#random.
The reason you can't get it to compile is that you have declared the same variable twice in lines 8 and 9. You also don't want the cast in line 11. Which program is giving you those error message? Is it Eclipse?
I am forced by my university to use drjava which is using eclipse compiler when i am not wrong.
i did not understood what you ment by "cast" further the error i am receiving is
File: /Users/Sommerfeld/Desktop/programming/RollingDice.java [line: 7]
Error: Syntax error on token(s), misplaced construct(s)
File: /Users/Sommerfeld/Desktop/programming/RollingDice.java [line: 11]
Error: Syntax error on token "}", delete this token
and what else can i write instead of static and why is it better to use something different,
sorry im have not programmed for quite some years but i really appreciate the help
You should write a class with the data as a field and create an instance of that class. I think you need the array as a field and it might be worth having a Random object as a field, too.
Thank you for correcting the indentation but I suspect some of the line numbers have changed. I presume you corrected the compiler errors?
Your program has logic errors, too, but we'll leave that to you to figure out once you get it running.
Also trinals will not be auto spell-checked as trials, it's up to you to watch out for these kind of differences. These are usually reported by the compiler as "undefined token" or something like that.