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
| import java.util.Arrays; | |
| import java.util.Scanner; | |
| public class TheSeaBattle { | |
| static char[] cells; | |
| static final char BLANK_SYMBOL = '.'; | |
| static final char SHIP_SYMBOL = 'X'; | |
| static final char MISSING_SYMBOL = '*'; | |
| static final char SUNK_SYMBOL = '#'; |
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
| import java.util.*; | |
| public class InitialTicTacToe { | |
| static int currentPlayer; | |
| public static void main(String[] args) { | |
| Scanner scanner = new Scanner(System.in); | |
| // Символ, которым заполним пустое поле | |
| final char BLANK_SYMBOL = '.'; |
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
| import java.util.Arrays; | |
| import java.util.Scanner; | |
| public class TheSeaBattle { | |
| static char[] cells; | |
| static final char BLANK_SYMBOL = '.'; | |
| static final char SHIP_SYMBOL = 'X'; | |
| static final char MISSING_SYMBOL = '*'; | |
| static final char SUNK_SYMBOL = '#'; | |
| static final int SIZE_PLAY_FIELD = (int)(Math.random() * 20) + 10; |
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
| /* public class Recurtion { | |
| public static void main(String[] args) { | |
| recurtion(0, 5); | |
| } | |
| private static void recurtion(int a, int diff) { | |
| System.out.println(a); | |
| a = a + diff; | |
| label: | |
| { |
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
| import controller.GameController; | |
| import model.Game; | |
| import view.GameWindow; | |
| import javax.swing.*; | |
| import java.lang.reflect.InvocationTargetException; | |
| public class Main { | |
| public static void main(String[] args) throws InvocationTargetException, InterruptedException { |
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
| public class Animal { | |
| static int generatorID; | |
| private String naim; | |
| private int age; | |
| private int id; | |
| Animal () { | |
| } | |
| public Animal (String naim, int age) { | |
| this.naim = naim; |
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 Products; | |
| import java.util.Arrays; | |
| import java.util.Objects; | |
| public class AdvancedProduct { | |
| String name; | |
| String cat; | |
| byte [] code; |
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 Products; | |
| import java.util.Arrays; | |
| public class AdvancedProduct { | |
| String name; | |
| String cat; | |
| byte [] code; | |
| public AdvancedProduct(Product product) { |
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 BookManager; | |
| public class Book { | |
| private String idBook; | |
| private String name; | |
| private String author; | |
| //private int id; | |
| static int booksCount; | |
| public Book(String name, String author) { |
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 Products; | |
| public class Main { | |
| public static void main(String[] args) { | |
| ProductCatalogs productCatalogs = new ProductCatalogs(); | |
| productCatalogs.initData(); | |
| System.out.println(ProductsDuplicates.findDuplicatesSlow(productCatalogs.getList1(), productCatalogs.getList2())); | |
| System.out.println(ProductsDuplicates.getStamp()); | |
| System.out.println(ProductsDuplicates.findDuplicatesFast(productCatalogs.getList1(), productCatalogs.getList2())); | |
| System.out.println(ProductsDuplicates.getStamp()); |
NewerOlder