Last active
August 29, 2015 14:10
-
-
Save OlgaKulikova/9ba91220b0f4b3a4a81b to your computer and use it in GitHub Desktop.
module1.lesson4.task3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package module1.lesson4.task3; | |
/* | |
Написать ф-ю, которая принимает на вход массив чисел и возвращает его длину в байтах как результат. | |
*/ | |
public class Main { | |
public static void main(String[] args) { | |
int[] array = new int[] {1, 2, 3, 4, 5}; | |
System.out.println(checkLength(array)); | |
} | |
public static int checkLength(int[] array) { | |
return array.length * 4; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment