This file contains 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 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 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 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 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 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 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 YourClassName { | |
public static void main(String[] args) { | |
String text = "Бла бла бла... Сегодня курс доллара составляет 47.97 грн."; |
This file contains 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 YourClassName { | |
public static void main(String[] args) { | |
// IP адрес |
This file contains 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 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