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 com.sunmeat; | |
| public class Program { | |
| public static void main(String[] args) { | |
| int size = 10; | |
| int[] ar = new int[size]; | |
| // заполнение массива циклом |
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 yourPackage; | |
| import java.util.Arrays; | |
| import java.util.Random; | |
| public class YourClassName { | |
| public static void main(String[] args) { | |
| Random random = new Random(); |
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 com.alex.sorting; | |
| public class JavaApplication1 { | |
| public static void main(String[] args) { | |
| int size = 10; | |
| int ar[] = new int[size]; | |
| // before sort |
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 yourPackage; | |
| public class YourClassName { | |
| public static void main(String[] args) { | |
| int size = 10; | |
| int ar[] = new int[size]; | |
| // before sort |
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 yourPackage; | |
| public class YourClassName { | |
| public static void main(String[] args) { | |
| int size = 10; | |
| int ar[] = new int[size]; | |
| // before sort |
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 yourPackage; | |
| public class YourClassName { | |
| public static void quickSort(int mass[], int start, int end) { | |
| int L = start, R = end; | |
| int M = mass[(start + end) / 2]; | |
| do { |
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 com.alex.regex; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| public class Program { | |
| public static void main(String[] args) { | |
| String text = "Бла бла бла... Сьогодні курс долара складає 41.97 грн."; |
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 com.alex.regex; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| public class Program { | |
| public static void main(String[] args) { | |
| // IP адреса |
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 com.alex.methods; | |
| public class JavaApplication1 { | |
| static void swap(int a, int b) { | |
| int temp = a; | |
| a = b; | |
| b = temp; | |
| } |
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 com.alex.methods; | |
| import java.util.Arrays; | |
| public class JavaApplication1 { | |
| static void changeArray(int[] ar) { | |
| ar[0] = 100; | |
| } | |
OlderNewer