Search⌘ K
AI Features

Time To Code: Task I to III

Explore how to build a Tic-Tac-Toe game by creating the game board, displaying it with Java methods, and writing code to track player turns. This lesson helps you apply essential programming skills such as arrays, methods, and boolean logic in a practical project.

Task I: Create a Tic-tac-toe board

Our task is to create a 3x3 game board.

Task II: Display the game board

Our task is to print the Tic-tac-toe board we created in the first task.

Let’s write the displayBoard method with the following signature:

public static void displayBoard(char[][] game_board)
...