What specifically are you having trouble with? Are you getting incorrect output? Do you get compile or runtime errors? You need to give more information about your problem.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
at pack1.cube.main(cube.java:94)
Java Result: 1
I dry run it.i dont know where the problem resides..!!
The error message is telling you exactly what's wrong. It's telling you that on line 94 of cube.java, you're trying to access the 4th element (at index 3) of an array that has fewer than 4 elements.