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.task1; | |
/* | |
Написать функцию, которая принимает в качестве аргументов одну строку X, целое число Y и число с плавающей точкой Z | |
и возвращает как результат строку в виде | |
S = x + y + z. | |
*/ | |
public class Main { | |
public static void main(String[] args) { |
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 personJson; | |
public class Address { | |
public String country; | |
public String city; | |
public String street; | |
@Override | |
public String toString() { | |
return "Country: " + country + "\n" + |
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 arrayHashMap; | |
// Решить задачу подсчета повторяющихся элементов в массиве с помощью HashMap. | |
import java.util.HashMap; | |
import java.util.Map; | |
public class Main { | |
public static void main(String[] args) { |
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 translator; | |
// Написать программу переводчик, которая будет переводить текст, | |
// написанный на одном языке, на другой язык согласно заранее составленному словарю. | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { |
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 human10; | |
import java.io.Serializable; | |
public class Human implements Serializable { | |
private String name, sex; | |
private int age; |
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
public class Solution { | |
public static int min(int a, int b, int c, int d) | |
{ | |
int m2 = min(a, b); | |
if (m2 < c & m2 < d) | |
return m2; | |
if (c < m2 & c < d) | |
return c; | |
if (d < c & d < m2) |
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 humanSer; | |
import java.io.Serializable; | |
public class Human implements Cloneable, Serializable { | |
public String name, sex; | |
public transient int age; | |
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 Recursion; | |
// Написать рекурсивную ф-ю для вывода на экран всех файлов и каталогов, | |
// имя которых длиннее 5 символов и вторая буква равна ‘A’. | |
import java.io.File; | |
import java.util.ArrayList; | |
public class Main { |
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 listFiles; | |
// Написать программу, которая создаст текстовый файл | |
// и запишет в него список файлов (путь, имя, дата создания) из заданного каталога. | |
import java.io.File; | |
import java.io.RandomAccessFile; | |
import java.text.SimpleDateFormat; | |
import java.util.ArrayList; | |
import java.util.Date; |
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 copyFiles; | |
// Написать программу для копирования всех файлов из одного каталога в другой. | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.util.ArrayList; | |
public class Main { |