Write a method called friendlyNumbers that accepts two 4-digit integer parameters ni and n2. The method will display whether ni and n2 are friendly number or not. The header of the method is: public...

What is the solution for this question (using java language)Write a method called friendlyNumbers that accepts two 4-digit integer<br>parameters ni and n2. The method will display whether ni and n2 are<br>friendly number or not.<br>The header of the method is:<br>public static void friendlyNumbers (int n1, int n2)<br>Note that two integers are friendly if the first digit and the last digit of both<br>numbers are the same. For example 3451 and 3981 are friendly numbers<br>because both numbers starts with 3 and ends with 1, but 3450 and 4650<br>are not.<br>

Extracted text: Write a method called friendlyNumbers that accepts two 4-digit integer parameters ni and n2. The method will display whether ni and n2 are friendly number or not. The header of the method is: public static void friendlyNumbers (int n1, int n2) Note that two integers are friendly if the first digit and the last digit of both numbers are the same. For example 3451 and 3981 are friendly numbers because both numbers starts with 3 and ends with 1, but 3450 and 4650 are not.

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here