This file contains 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 com.javarush.task.task11.task1123; | |
/* | |
Написать метод, который возвращает минимальное и максимальное числа в массиве. | |
*/ | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
int[] data = new int[]{1, 2, 3, 5, -2, -8, 0, 77, 5, 5}; | |
Pair<Integer, Integer> result = getMinimumAndMaximum(data); |
This file contains 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
/* | |
метод, который определяет, объект какого класса ему передали, и | |
выводит на экран одну из надписей: Кошка, Собака, Птица, Лампа. | |
*/ | |
public class Solution { | |
public static void main(String[] args) { | |
printObjectType(new Cat()); | |
printObjectType(new Bird()); | |
printObjectType(new Lamp()); |
This file contains 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
/* | |
Метод, который выводит на экран число 10 | |
*/ | |
public class Solution { | |
public static void main(String[] args) { | |
Integer i = 5; | |
int x = transformValue(i); |
This file contains 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
/* | |
Нужно исправить программу, чтобы компилировалась и работала | |
*/ | |
public class Solution { | |
public static void main(String[] args) { | |
Horse horse = new Pegas(); | |
horse.run(); |
This file contains 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
/* | |
Пиво | |
*/ | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
} | |
public interface Drink { | |
void askMore(String message); |
This file contains 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
/* | |
4 ошибки | |
*/ | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
System.out.println( Dream.HOBBIE.toString()); |
This file contains 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
/* | |
Баг в initializeIdAndName | |
*/ | |
public class Solution | |
{ | |
public static void main(String[] args) throws Exception | |
{ | |
System.out.println(Matrix.NEO); |
This file contains 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
/* | |
CleverMan и SmartGirl | |
*/ | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
} | |
interface Person { |
This file contains 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
/* | |
Переводчик с английского | |
*/ | |
public class Solution | |
{ | |
public static void main(String[] args) throws Exception | |
{ | |
EnglishTranslator englishTranslator = new EnglishTranslator(); |
This file contains 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
/* | |
Интерфейс Animal | |
*/ | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
} | |
public interface Animal { |
OlderNewer