diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a5982f0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+out/*
+
+src/multithreading/AnotherNewClass.java
+.idea/workspace.xml
+
diff --git a/.idea/libraries/sqlite_jdbc_3_28_0.xml b/.idea/libraries/sqlite_jdbc_3_28_0.xml
new file mode 100644
index 0000000..86c0f67
--- /dev/null
+++ b/.idea/libraries/sqlite_jdbc_3_28_0.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index d5d79e0..fc2c0fd 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..e96534f
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index d25a2ec..4d7c5a0 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,6 +4,7 @@
+
@@ -14,106 +15,32 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -128,9 +55,27 @@
+
+
+ MyThread
+ rn
+ Ы
+ thrdClass
+
+
+ m
+ bl
+
+
+
+
+
+
@@ -158,31 +108,64 @@
DEFINITION_ORDER
-
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -196,135 +179,205 @@
-
-
+
+
+
-
+
-
-
-
-
-
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
-
+
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -344,200 +397,125 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ file://$PROJECT_DIR$/src/multithreading/testClass.java
+ 37
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
+
+
@@ -606,6 +584,7 @@
+ sqlite-jdbc-3.28.0
diff --git a/14072019.iml b/14072019.iml
index c90834f..b5aee77 100644
--- a/14072019.iml
+++ b/14072019.iml
@@ -7,5 +7,6 @@
+
\ No newline at end of file
diff --git a/sqlite-jdbc-3.28.0.jar b/sqlite-jdbc-3.28.0.jar
new file mode 100644
index 0000000..5722bf0
Binary files /dev/null and b/sqlite-jdbc-3.28.0.jar differ
diff --git a/src/Lesson_1/Box.java b/src/Lesson_1/Box.java
deleted file mode 100644
index dca7b60..0000000
--- a/src/Lesson_1/Box.java
+++ /dev/null
@@ -1,205 +0,0 @@
-package Lesson_1;
-
-import java.util.Arrays;
-
-public class Box {
- String name;
- String color;
- int age;
-
- public Box(String name) {
- this.name = name;
- }
-
- public Box(String name, String color, int age) {
- this.name = name;
- this.color = color;
- this.age = age;
- }
-
- public Box(String name, String color) {
- this.name = name;
- this.color = color;
- }
-
- public void info() {
- System.out.println(name + " " + color + " " + age);
- }
-
- public int summ(int... a) {
- int res = 0;
-
- for (int i = 0; i < a.length; i++) {
- res += a[i];
- }
-
- return res;
- }
-
-}
-
-class Tools {
-
- protected String[] mass = {"Bob1", "Bob2", "Bob3"};
-
- public String[] getMass() {
- String[] currentMass = new String[mass.length];
-
- for (int i = 0; i < mass.length; i++) {
- currentMass[i] = mass[i];
- }
-
- return currentMass;
- }
-
-}
-
-class MainBox {
- public static void main(String[] args) {
-
- Tools tools = new Tools();
-
- String[] mass1 = tools.getMass();
-
- mass1[1] = "Bob555";
- System.out.println(Arrays.toString(tools.getMass()));
-
-// Box box1 = new Box("box1", "red", 5);
-// Tools tools = new Tools("hummer");
-//
-// box1.startThis(tools);
-
-
-// Box box1 = new Box("box1", "red", 5);
-// Box box2 = new Box("box2", "black");
-//
-//// box1.info();
-//// box2.info();
-//
-// System.out.println(box1.summ(1,2,5,5,10));
-// MainBox mainBox = new MainBox();
-// mainBox.abc();
-
-
-// Box[] boxes = {new Box("box1"), new Box("box2")};
-//
-// boxes[0].name = "box1";
-// boxes[1].name = "box2";
-//
-// boxes[0].info();
-// boxes[1].info();
-
- }
-
-// void abc() {
-// System.out.println(1);
-// }
-}
-
-interface Run {
- void run();
-
- default void print() {
- System.out.println("test");
- }
-}
-
-
-abstract class Animal implements Run {
- // protected String name;
-// protected int z;
-//
-// public Animal(String name) {
-// this.name = name;
-// }
-//
-// public void info() {
-// System.out.println("Animal");
-// }
- abstract void test1();
-
- public void info() {
- System.out.println("Animal");
- }
-
-}
-
-
-
-//class Cat extends Animal {
-//
-// protected int y;
-//
-// public Cat(String name, int y) {
-// super(name);
-// this.y = y;
-// }
-//
-// public void info() {
-// System.out.println("Cat");
-// }
-//}
-//
-//class SuperCat extends Cat {
-//
-// protected int i;
-//
-// public SuperCat(String name, int y, int i) {
-// super(name, y);
-// this.i = i;
-// }
-//
-// void test() {
-// super.z = 10;
-// }
-//
-// public void info() {
-// System.out.println("SuperCat");
-// }
-//}
-
-class MainZoo implements Run {
- public static void main(String[] args) {
-//
-// Object o;
-// Animal animal = new Animal("asd");
-// // Cat cat = new Animal("asd");
-//
-// o = animal;
-
-// Animal[] animals = {new Animal("asd"), new Cat("Murzik", 1), new SuperCat("Barsik",2,2)};
-//
-// for (Animal animal: animals) {
-// animal.info();
-// }
-
- }
-
- @Override
- public void run() {
-
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Lesson_1/Lesson_1.java b/src/Lesson_1/Lesson_1.java
deleted file mode 100644
index 03b993e..0000000
--- a/src/Lesson_1/Lesson_1.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package Lesson_1;
-
-public class Lesson_1 {
-
- int a = 10;
-
- public static void main(String[] args) {
-
- }
-
- public static void test() {
- int b = 10;
- String c = "sadf";
- }
-}
diff --git a/src/Lesson_1/Marathon/Animal.java b/src/Lesson_1/Marathon/Animal.java
deleted file mode 100644
index 7b0bca9..0000000
--- a/src/Lesson_1/Marathon/Animal.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package Lesson_1.Marathon;
-
-public class Animal implements Competitor {
- String type;
- String name;
-
- int maxRunDistance;
- int maxJumpHeight;
- int maxSwimDistance;
-
- boolean onDistance;
-
- @Override
- public boolean isOnDistance() {
- return onDistance;
- }
-
- public Animal(String type, String name, int maxRunDistance, int maxJumpHeight, int maxSwimDistance) {
- this.type = type;
- this.name = name;
- this.maxRunDistance = maxRunDistance;
- this.maxJumpHeight = maxJumpHeight;
- this.maxSwimDistance = maxSwimDistance;
- this.onDistance = true;
- }
-
- @Override
- public void run(int dist) {
- if (dist <= maxRunDistance) {
- System.out.println(type + " " + name + " хорошо справился с кроссом");
- } else {
- System.out.println(type + " " + name + " не справился с кроссом");
- onDistance = false;
- }
- }
-
- @Override
- public void jump(int height) {
- if (height <= maxJumpHeight) {
- System.out.println(type + " " + name + " удачно перепрыгнул через стену");
- } else {
- System.out.println(type + " " + name + " не смог перепрыгнуть стену");
- onDistance = false;
- }
- }
-
- @Override
- public void swim(int dist) {
- if (maxSwimDistance == 0) {
- System.out.println(type + " " + name + " не умеет плавать");
- onDistance = false;
- return;
- }
- if (dist <= maxSwimDistance) {
- System.out.println(type + " " + name + " отлично проплыл");
- } else {
- System.out.println(type + " " + name + " не смог проплыть");
- onDistance = false;
- }
- }
-
-
- @Override
- public void info() {
- System.out.println(type + " " + name + " - " + onDistance);
- }
-}
\ No newline at end of file
diff --git a/src/Lesson_1/Marathon/Cat.java b/src/Lesson_1/Marathon/Cat.java
deleted file mode 100644
index 3056a4a..0000000
--- a/src/Lesson_1/Marathon/Cat.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package Lesson_1.Marathon;
-
-public class Cat extends Animal {
- public Cat(String name) {
- super("Кот", name, 200, 20, 0);
- }
-}
diff --git a/src/Lesson_1/Marathon/Competitor.java b/src/Lesson_1/Marathon/Competitor.java
deleted file mode 100644
index c59b359..0000000
--- a/src/Lesson_1/Marathon/Competitor.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package Lesson_1.Marathon;
-
-public interface Competitor {
- void run(int dist);
- void swim(int dist);
- void jump(int height);
- boolean isOnDistance();
- void info();
-}
\ No newline at end of file
diff --git a/src/Lesson_1/Marathon/Cross.java b/src/Lesson_1/Marathon/Cross.java
deleted file mode 100644
index 16a4d51..0000000
--- a/src/Lesson_1/Marathon/Cross.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package Lesson_1.Marathon;
-
-public class Cross {
- private Obstacle[] obstacles; // = {new Wall(10), new Water(10)};
-
- public Cross(Obstacle... obstacle) { this.obstacles = obstacle; }
-
- public void doIt(Team team) {
- Competitor[] competitor = team.getTeam();
- for (int c = 0; c < competitor.length && competitor[c].isOnDistance(); c++) {
- for (int o = 0; o < obstacles.length; o++) {
- obstacles[o].doIt( competitor[c] );
- }
-// competitor[c].info();
- }
- }
-
- public void showResult(Team team) {
- System.out.println("Название команды: " + team.getTeamName());
- Competitor[] competitor = team.getTeam();
- for (int c = 0; c < competitor.length; c++) {
- competitor[c].info();
- }
- }
-}
\ No newline at end of file
diff --git a/src/Lesson_1/Marathon/Dog.java b/src/Lesson_1/Marathon/Dog.java
deleted file mode 100644
index bed5348..0000000
--- a/src/Lesson_1/Marathon/Dog.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package Lesson_1.Marathon;
-
-public class Dog extends Animal {
- public Dog(String name) {
- super("Пес", name, 500, 5, 20);
- }
-}
\ No newline at end of file
diff --git a/src/Lesson_1/Marathon/Human.java b/src/Lesson_1/Marathon/Human.java
deleted file mode 100644
index 16aba20..0000000
--- a/src/Lesson_1/Marathon/Human.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package Lesson_1.Marathon;
-
-public class Human implements Competitor {
- String name;
-
- int maxRunDistance;
- int maxJumpHeight;
- int maxSwimDistance;
-
- boolean active;
-
- @Override
- public boolean isOnDistance() {
- return active;
- }
-
- public Human(String name) {
- this.name = name;
- this.maxRunDistance = 5000;
- this.maxJumpHeight = 30;
- this.maxSwimDistance = 200;
- this.active = true;
- }
-
- @Override
- public void run(int dist) {
- if (dist <= maxRunDistance) {
- System.out.println(name + " хорошо справился с кроссом");
- } else {
- System.out.println(name + " не справился с кроссом");
- active = false;
- }
- }
-
- @Override
- public void jump(int height) {
- if (height <= maxJumpHeight) {
- System.out.println(name + " удачно перепрыгнул через стену");
- } else {
- System.out.println(name + " не смог перепрыгнуть стену");
- active = false;
- }
- }
-
- @Override
- public void swim(int dist) {
- if (dist <= maxSwimDistance) {
- System.out.println(name + " отлично проплыл");
- } else {
- System.out.println(name + " не смог проплыть");
- active = false;
- }
- }
-
- @Override
- public void info() {
- System.out.println(name + " - " + active);
- }
-}
\ No newline at end of file
diff --git a/src/Lesson_1/Marathon/Main.java b/src/Lesson_1/Marathon/Main.java
deleted file mode 100644
index 3779c72..0000000
--- a/src/Lesson_1/Marathon/Main.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package Lesson_1.Marathon;
-
-public class Main {
- public static void main(String[] args) {
- Team myTeam = new Team ("Моя команда", new Human("Боб"), new Cat("Барсик"), new Dog("Бобик"), new Human("Женя"));
-
- //Competitor[] competitors = {new Human("Боб"), new Cat("Барсик"), new Dog("Бобик")};
- Cross cross = new Cross (new Wall(2), new Water(1), new Water(4));
-
- cross.doIt(myTeam);
- cross.showResult(myTeam);
- }
-}
\ No newline at end of file
diff --git a/src/Lesson_1/Marathon/Obstacle.java b/src/Lesson_1/Marathon/Obstacle.java
deleted file mode 100644
index 332d8e7..0000000
--- a/src/Lesson_1/Marathon/Obstacle.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package Lesson_1.Marathon;
-
-public abstract class Obstacle {
- public abstract void doIt(Competitor competitor);
-}
diff --git a/src/Lesson_1/Marathon/Team.java b/src/Lesson_1/Marathon/Team.java
deleted file mode 100644
index 269727f..0000000
--- a/src/Lesson_1/Marathon/Team.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package Lesson_1.Marathon;
-
-public class Team {
- private Competitor[] teamMembers;
- private String teamName;
-
- public Team (String teamName, Competitor ... teamMembers) {
- this.teamName = teamName;
- this.teamMembers = teamMembers;
- }
-
- public Competitor[] getTeam () {
- return this.teamMembers;
- }
-
- public void setCommandName(String commandName) {
- this.teamName = commandName;
- }
- public String getTeamName() {
- return teamName;
- }
-}
diff --git a/src/Lesson_1/Marathon/Wall.java b/src/Lesson_1/Marathon/Wall.java
deleted file mode 100644
index 5090297..0000000
--- a/src/Lesson_1/Marathon/Wall.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package Lesson_1.Marathon;
-
-public class Wall extends Obstacle {
- int height;
-
- public Wall(int height) {
- this.height = height;
- }
-
- @Override
- public void doIt(Competitor competitor) {
- competitor.jump(height);
- }
-}
\ No newline at end of file
diff --git a/src/Lesson_1/Marathon/Water.java b/src/Lesson_1/Marathon/Water.java
deleted file mode 100644
index 83000a3..0000000
--- a/src/Lesson_1/Marathon/Water.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package Lesson_1.Marathon;
-
-public class Water extends Obstacle {
- int length;
-
- public Water(int length) {
- this.length = length;
- }
-
- @Override
- public void doIt(Competitor competitor) {
- competitor.swim(length);
- }
-}
\ No newline at end of file
diff --git a/src/Lesson_1/Test.java b/src/Lesson_1/Test.java
deleted file mode 100644
index ccdd6cf..0000000
--- a/src/Lesson_1/Test.java
+++ /dev/null
@@ -1,192 +0,0 @@
-package Lesson_1;
-
-public class Test {
-}
-
-
-//class Tetst1 {
-// public static void main(String[] args) {
-// int i = 8;
-// System.out.println(i++);
-// System.out.println(i+1);
-// System.out.println(i);
-// }
-//}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-//class Task1 {
-// public static void main(String[] args) {
-// System.out.println(new Task1());
-// }
-//}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-//class A {
-// {
-// System.out.println("dym a");
-// }
-//
-// static {
-// System.out.println("stat a");
-// }
-//
-// A(){
-// System.out.println("A");
-// }
-//
-// public static void main(String[] args) {
-// new A();
-// }
-//}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-//class TestEquals {
-// public static void main(String[] args) {
-// String s1 = new String("Bicycle");
-// String s2 = new String("bicycle");
-// System.out.println(s1.equals(s2) == s2.equals(s1));
-// }
-//}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-class TestInc {
- public static void main(String[] args) {
- int x = 0;
- System.out.print(x++==++x);
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-//class TestStr {
-// public static void main(String[] args) {
-// String s = new String("ssssss");
-// StringBuffer sb = new StringBuffer("bbbbbb");
-// s.concat("-aaa");
-// sb.append("-aaa");
-// System.out.println(s);
-// System.out.println(sb);
-// }
-//}
\ No newline at end of file
diff --git a/src/multithreading/ThreadClass.java b/src/multithreading/ThreadClass.java
new file mode 100644
index 0000000..cc77d4f
--- /dev/null
+++ b/src/multithreading/ThreadClass.java
@@ -0,0 +1,34 @@
+package multithreading;
+
+import java.lang.Thread;
+
+public class ThreadClass implements Runnable {
+ private float[] arr;
+ Thread thrd;
+ private int lbegin;
+
+ ThreadClass(float[] arr, int lbegin) {
+ this.arr = arr;
+ this.lbegin = lbegin;
+ thrd = new Thread(this);
+ thrd.start();
+ }
+
+ @Override
+ public void run() {
+// System.out.println("Начинаем поток");
+ for (int i = 0; i < arr.length; i++) {
+ arr[i] = 1f;
+ arr[i] = (float)(arr[i] * Math.sin(0.2f + (lbegin + i)/5) * Math.cos(0.2f + (lbegin + i)/5) * Math.cos(0.4f + (lbegin + i)/2));
+ }
+ }
+
+ public void setLBegin(int lbegin) {
+ this.lbegin = lbegin;
+ }
+
+ public float[] getArr() {
+ return this.arr;
+ }
+
+}
diff --git a/src/multithreading/testClass.java b/src/multithreading/testClass.java
new file mode 100644
index 0000000..baaa163
--- /dev/null
+++ b/src/multithreading/testClass.java
@@ -0,0 +1,90 @@
+package multithreading;
+import java.lang.Math;
+import java.util.ArrayList;
+
+public class testClass {
+ static final int size = 10000000;
+ static float[] arr = new float [size];
+ static int threadQty = 2; //Количество потоков
+ static int length = size/threadQty;
+
+
+ static void showArray(float[] array) {
+ ArrayList positions = new ArrayList();
+ for (int i =1; i < threadQty; i++) {
+ for (int j = 0, k = i * length -5; j < 10; j++ ) {
+ positions.add(k + j);
+ }
+ }
+ for (int j = 0, k = threadQty * length -5; j < 10 && k + j < size; j++ ) {
+ positions.add(k + j);
+ }
+
+ int j = 0;
+
+ for (int i : positions) {
+ System.out.printf("%15.8f", array[i]);
+ if (++j %10 == 0) System.out.println();
+ }
+ }
+
+ static void simpleMethod() {
+ long a = System.currentTimeMillis();
+ for (int i = 0; i < size; i++) {
+ arr[i] = 1f;
+ arr[i] = (float)(arr[i] * Math.sin(0.2f + i/5) * Math.cos(0.2f + i/5) * Math.cos(0.4f + i/2));
+ }
+ System.out.printf("Время работы - %f милисекунд\n", (float) (System.currentTimeMillis() - a));
+
+ showArray(arr);
+ System.out.println();
+ }
+
+ public static void main(String ... args) {
+ simpleMethod();
+
+ System.out.println("\n" + "Вычисление массива через потоки.");
+ long a = System.currentTimeMillis();
+
+ float[] res1, res;
+ res = new float[size];
+
+ int lbegin;
+ int lend = -1;
+ ArrayList storeThreadClass = new ArrayList();
+
+ for (int l =1; lend + 1 < size - 1 ; l++) {
+ long b = System.currentTimeMillis();
+ lbegin = lend + 1;
+ lend = lbegin + length;
+ if (lend >= size) lend = size - 1;
+
+ float[] tempArray = new float[lend - lbegin];
+ ThreadClass tempThread = new ThreadClass(tempArray, lbegin);
+ storeThreadClass.add(tempThread);
+
+ }
+
+
+ for (ThreadClass tempThread : storeThreadClass) {
+ try {
+ tempThread.thrd.join();
+ }
+ catch (InterruptedException exc) {
+ exc.printStackTrace();
+ }
+ }
+ lbegin = 0;
+
+ for (ThreadClass tempThread : storeThreadClass) {
+ res1 = tempThread.getArr();
+ System.arraycopy(res1, 0, res, lbegin, res1.length);
+ lbegin += res1.length;
+ lbegin += 1;
+ }
+
+ System.out.printf("Время работы - %f милисекунд\n", (float) (System.currentTimeMillis() - a));
+
+ showArray(res);
+ }
+}