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 Monitor; | |
| import java.io.IOException; | |
| public class Main { | |
| public static void main(String[] args) { | |
| System.out.println( "Добавить в проект «монитор» функцию вывода даты создания файла на экран (см. java.io.File)."); | |
| Monitor m = new Monitor("d:\\1.txt", new FileEvent()); |
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; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.ArrayList; | |
| /*Написать рекурсивную ф-ю для вывода на экран всех файлов и каталогов, имя которых длиннее 5 | |
| символов и вторая буква равна ‘A’.*/ | |
| 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 CreateFile; | |
| /*Написать программу, которая создаст текстовый файл и запишет в него список файлов (путь, имя, дата создания) из заданного каталога.*/ | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.sql.Date; | |
| import java.util.ArrayList; |
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 CopyFile; | |
| /*Написать программу для копирования всех файлов из одного каталога в другой.*/ | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.FileOutputStream; | |
| import java.io.FilenameFilter; | |
| import java.io.IOException; | |
| import java.util.ArrayList; |
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
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| /* Написать программу, которая считает текстовый файл, заменит | |
| * в нем все слова “Hello” на “1234” и запишет изменения в тот-же файл.*/ | |
| public class FileRW { |
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 FindFiles; | |
| /* Модифицироватьпроект FindFiles так, чтобы программа искала в каталоге все файлы с расширениями из списка.*/ | |
| import java.io.File; | |
| import java.io.FilenameFilter; | |
| import java.io.IOException; | |
| 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 Student; | |
| import java.text.ParseException; | |
| import java.text.SimpleDateFormat; | |
| import java.util.Date; | |
| import java.util.Scanner; | |
| import Student.Inpt.NumeralExceptions; | |
| import Student.Inpt.TextExceptions; |
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 Figures_polimorfism; | |
| public class Circle extends Figures { | |
| public Circle(){ | |
| a=5; | |
| //System.out.println("Конструктор Круг"); | |
| } | |
| public Circle( int a){ |
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 Human; | |
| public class HumanComparable implements Comparable{ | |
| private int age; | |
| public HumanComparable (int age){ | |
| this.age= age; | |
| } | |
| public int getAge(){ |
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 Figures_polimorfism; | |
| public class Circle extends Rectangle { | |
| public Circle(){ | |
| r=5; | |
| //System.out.println("Конструктор Круг"); | |
| } | |
| public Circle( int r){ |