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 lesson3; | |
import java.util.Arrays; | |
public class Homework2 { | |
public static void main(String[] args) { | |
int[] arr = {0, 1, 2}; | |
int[] arr2 = new int[2]; |
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
/* | |
* Copyright (c) 2013 midgardabc.com | |
*/ | |
package lesson3; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import javax.swing.JFrame; | |
import javax.swing.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 lesson3; | |
import java.util.Arrays; | |
public class Birds { | |
static String[][] birds = new String[2][4]; | |
public static void main(String[] args) { | |
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 lesson3; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.WindowConstants; |
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 GreetingService { | |
public static void main(String[] args) { | |
if (args.length > 0) { | |
System.out.println("Hello " + args[0]); | |
} | |
else { | |
System.out.println("Print 'java GreetingService ' and enter name "); | |
} |
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 lesson4; | |
public class Bed { | |
String color; | |
String manufactureBy; | |
int bedLength; | |
int bedWidth; | |
int reccomendLoading; |
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 lesson4; | |
public class Tank { | |
String color; | |
int crew; | |
int maxSpeed; | |
Tank() { | |
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 lesson4; | |
public class RunTank { | |
public static void main(String[] args) { | |
RunTank runTank = new RunTank(); | |
runTank.printTankInfo(); | |
} | |
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 lesson4; | |
public class Car { | |
private String name = "ref3"; | |
private String ownerName; | |
private String vehicleCategory; | |
private int capacity; | |
private int maxSpeed; | |
private boolean isFull; |
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 lesson4.gametank; | |
import java.awt.*; | |
/** | |
* Created by anna on 27.10.15. | |
*/ | |
public class ActionField { | |
BattleField bf; |