Getting started with java Basics

just started self-taught java, today to ask a simple question, why is this method wrong? the error message is
Required: Direction (another class?
found:int
static Direction tileCodeToOrientation (int tileCode) {

int tileIndex = tileCode % 4;
int boardPosition;
if (tileIndex >= 0 && tileIndex<=2){
  boardPosition = tileIndex + 6;
}
   else if (tileIndex >= 3 && tileIndex<=5){
  boardPosition = tileIndex + 8;
}
   else if (tileIndex >= 6 && tileIndex<=8){
  boardPosition = tileIndex + 10;
}


/*  tiles index board         board position
 col:    3 2 1    row:      col:    3 2 1   row:
         0 1 2   1                  0 1 2     1
         3 4 5   2                  3 4 5     2
         6 7 8   3                  6 7 8     3

* /

return boardPosition;
board
Apr.03,2021

personal opinion:

static Direction tileCodeToOrientation(int tileCode)

the above method definition return type is Direction, but the method return value is int type

int boardPosition;
return boardPosition;

the return type of the method tone does not match the actual return type, so I hope the error
will be helpful to you. Thank you

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7b65e3-1ec40.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7b65e3-1ec40.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?