NEED HELP! DONT KNOW HOW TO PLACE FIVE SHIPS IN A 2D ARRAY THAT IS (10BY10). THEN HAVE THE USER GUESS THE LOCATIONS OF EACH SHIP. EACH CORRECT GUESS IS A HIT AND WHEN THE SHIP IS COMPLETELY HIT IT IS SUNK. THEN PRINTOUT HOW MANY GUESSES IT TOOK TO SINK SHIP. THIS IS WHAT I HAVE SO FAR.
public class BattleShip{
public static void main(String[]args){
final int Rows=10;
final int Cols=10;
int[][]board=new int[Rows][Cols];
for(int x=0; x<Rows; x++){
for(int y=0; y<Cols; y++){
board[Rows][Cols]=100;
System.out.println(board[Rows][Cols]);
}
}
}
}


public class BattleShip{
public static void main(String[]args){
final int Rows=10;
final int Cols=10;
int[][]board=new int[Rows][Cols];
for(int x=0; x<Rows; x++){
for(int y=0; y<Cols; y++){
board[Rows][Cols]=100;
System.out.println(board[Rows][Cols]);
}
}
}
}