Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Basic Matrix
//Title of this code //'main' method must be in a class 'Rextester'. import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { System.out.println("Hello, World!"); System.out.print("Matriz de 6 * 6: "); new Rextester().mat( 6 ); } public void mat( int top ) { int[][] m = new int[ top ][ top ]; for( int i=0; i<m.length ; i++ ) { System.out.println(); for( int j=0; j<m.length; j++ ) { m[ i ][ j ] = 1 + new Random().nextInt( 15 ); System.out.print( m[ i ][ j ] + "\t" ); } } } }
run
|
edit
|
history
|
help
0
Catalan number optimised
Item battle rolyal
ArrayOperation
square of array element
data
Fibonnaci + Prime number combined
Java
Triangle
Black Jack by Craig
Basic LinkedList in Java