Java Taskbook Level 9.10

Задание 1

Ask the user for two numbers. Check whether these numbers are friendly or not.

Задание 2

Given a line:

java"""
  text1
  text2
  
  text3
  text4
  
  text5
"""

Remove all empty lines from it that are not at the beginning or end of the text:

java"""
  text1
  text2
  text3
  text4
  text5
"""
Задание 3

Given some array:

javaint[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};

Given a variable:

javabyte n = 3;

Turn this array into a two-dimensional array, with n elements per subarray.