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 Arrays; | |
import java.util.Arrays; | |
public class SortLogic { | |
public static void main(String[] args) { | |
int[] data = createArray(10); | |
System.out.println(Arrays.toString(data)); |
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 Arrays; | |
import java.util.Arrays; | |
public class Sort { | |
static int l = 0;// для вроторого варианта сортировки sort2 | |
public static void main(String[] args) { | |
int[] data = { 0, 90, 807, 55, 3, -6, 400, 1000 }; |
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 Arrays; | |
import java.util.Arrays; | |
public class Sort { | |
static int l = 0;// для вроторого варианта сортировки sort2 | |
public static void main(String[] args) { | |
int[] data = { 0, 90, 807, 55, 3, -6, 400, 1000 }; |
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 Arrays; | |
//import java.util.Arrays; | |
public class SwapArray { | |
public static void main(String[] args) { | |
int[] data = { 1, -4, 5, 0 }; | |
swap(data); |
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 Arrays; | |
//import java.util.Arrays; | |
public class SwapArray { | |
public static void main(String[] args) { | |
int[] data = { 1, -4, 5, 0 }; | |
swap(data); |
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 Arrays; | |
public class Average { | |
public static void main(String[] args) { | |
int[] data = { 1, 2, 3, 4 }; | |
System.out.println(average(data)); | |
int[] data1 = { -9, 8, 32, 7 }; | |
System.out.println(average(data1)); | |
int[] data2 = null; |
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 Arrays; | |
public class Summa { | |
static long i = 0; | |
static int index = 1; | |
public static void main(String[] args) { | |
int[] data = { 1, 2, 3, 4 }; | |
System.out.println(oddElementSum(data)); | |
int[] data1 = { 0 }; |
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 Arrays; | |
public class PrintArrays { | |
public static void main(String[] args) { | |
int[] data = { 1, 10, 5, 7, 6 }; | |
printArrays(data); | |
int[] data2 = { 0 }; | |
printArrays(data2); |
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 Tanks; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.WindowConstants; | |
public class BattleFieldTemplate extends JPanel { |
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 Arrays; | |
import java.util.Arrays; | |
public class Swap { | |
public static void main(String[] args) { | |
int[] data = { 1, -4, 5, 0 }; | |
int i = 1; | |
int k = 3; |
NewerOlder