Skip to content

Printing Output

Akshath Raghav edited this page Jul 4, 2021 · 3 revisions

toString()/System.out.println(cube)

--> Prints out the cube so that its easy to understand

Cubot cube3x3 = new Cubot(true) ; 
Cubot cube2x2 = new Cubot(false) ; 
System.out.println(cube3x3) ; 
System.out.println(cube2x2) ; 

example

example


indexString()

--> Prints out the cube with indexes and colors on each face of the cube pieces ( along with indexes )

Cubot cube3x3 = new Cubot(true) ; 
Cubot cube2x2 = new Cubot(false) ; 
System.out.println(cube3x3.indexedString()) ; 
System.out.println(cube2x2.indexedString()) ; 

example

example