mirror of
https://github.com/ASDjonok/OOP_IO-2x_2023.git
synced 2025-06-07 22:49:24 +03:00
Merge branch 'master' into commit-fix
This commit is contained in:
commit
4eecffe040
@ -1,3 +1,5 @@
|
|||||||
|
package lab3;
|
||||||
|
|
||||||
public class Lab3 {
|
public class Lab3 {
|
||||||
private static final int REPETITION_NUMBER = 10;
|
private static final int REPETITION_NUMBER = 10;
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
18
src/lab3/Variant0.java
Normal file
18
src/lab3/Variant0.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package lab3;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Знайти найбільшу кількість речень заданого тексту, в яких є однакові слова.
|
||||||
|
*/
|
||||||
|
public class Variant0 {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String textString = "A, a. B a. B a. B a. C.";
|
||||||
|
final String[] sentencesStrings = textString.split("\\. ?");
|
||||||
|
for (String sentencesString : sentencesStrings) {
|
||||||
|
System.out.println(sentencesString);
|
||||||
|
}
|
||||||
|
// System.out.println(Arrays.toString(sentencesStrings));
|
||||||
|
System.out.println("++++++++++++");
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user