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 ThingsCatalog; | |
| import java.util.ArrayList; | |
| public final class Book extends Thing { | |
| private String isbn; | |
| private String name; | |
| private String author; | |
| private ArrayList<Thing> thingArrayList; |
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 CrisCross { | |
| public static void main(String[] args) { | |
| char[][] cells; | |
| cells = new char[3][3]; | |
| char player1 = 'X'; | |
| char player2 = 'O'; | |
| int x; | |
| int y; | |
| int currentPlayer = 1; |
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 ATM; | |
| public class Atm { | |
| Card currentCard = null; | |
| private User currentUser; | |
| Atm() { | |
| System.out.println("Вставьте карту..."); | |
| } |
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 AnonimClass; | |
| public class Aircraft implements Flyable{ | |
| @Override | |
| public void fly() { | |
| } | |
| @Override | |
| public void takeoff() { |
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 ThingsCatalog; | |
| import java.util.ArrayList; | |
| public final class Book extends Thing { | |
| private String isbn; | |
| private String name; | |
| private String author; | |
| private ArrayList<Thing> thingArrayList; |
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 Table { | |
| public static void main(String[] args) { | |
| showTable2(2, 10); | |
| } | |
| static void showTable2(int from, int to) { |
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 BMI { | |
| public static void main(String[] args) { | |
| showBMI(); | |
| } | |
| static void showBMI() { | |
| int w = 51; | |
| double h = 1.61; |
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 IgorDolgov.cats; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Cat masha = new Cat("Маша"); | |
| Cat misha = new Cat("Миша"); | |
| Cat gala = new Cat("Галя"); | |
| Cat kate = new Cat("Kate"); |
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 Cosmoport; | |
| public class Game { | |
| Spaceport spaceport; | |
| Spaceship spaceship; | |
| Pilot pilot; | |
| public void init() { | |
| this.spaceport = new Spaceport("Baykonur"); |
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 int idBook; | |
| private String name; | |
| private String author; | |
| static int booksCount; | |
| public Book(String name, String author) { | |
| booksCount++; |