Course Solutions Uncategorized (Solved) : Method Returns Coordinates Game Battleship Array Declared Two Integers Instead One Would H Q34209297 . . . .

(Solved) : Method Returns Coordinates Game Battleship Array Declared Two Integers Instead One Would H Q34209297 . . . .

 

This method returns the coordinates in a game of Battleship. Why is the array declared with two integers instead of one? It would be very helpful if someone could comment each line of code so I can get a better understanding of what is going on. Thanks.public int[] getCoordinates(String input){ int[] coordinates = new int[2]; String[] strList = input.split(” “); int row = strList[0].charAt(0) – ‘a’; int col = Integer.parseInt(strList[1]); coordinates[0] = row; coordinates[1] = col; return coordinates;}

Expert

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Hi Relational Databases Question M Struggling Homework Question Trying Better Understand S Q31072567 . . . .(Solved) : Hi Relational Databases Question M Struggling Homework Question Trying Better Understand S Q31072567 . . . .

<p>Hi,</p><p>This is relational databases question</p><p>I'm struggling with this homework question. Trying to betterunderstand what's being asked. Could you please explain youranswer. Many thanks</p><p><img alt="Consider the relation schema R-A, B, C,