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 darkZone; | |
public class DAY2Theme4Frame4DarkZone { | |
public static void main(String[] args) { | |
int monthlyPayment = 100; | |
int interest = 12; | |
int dreamSum = 1_000_000; | |
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 autoboxingUnboxing; | |
public class AutoboxingUnboxing { | |
public static void main(String[] args) { | |
Integer a = 10; | |
int b = 5; | |
Double f = 12.4; | |
double d = 3.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
public class BT7 extends Tank { | |
BT7() { | |
this("BT7", Color.BRAWN, 4); | |
} | |
BT7(String name, Color color, int crew) { | |
this.name = 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 cars; | |
import furyTanks.Color; | |
public class Car { | |
String brand; | |
String model; | |
Color color; | |
String chassis; |
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 Armour { | |
String tankName; | |
Gun2 gun; | |
public Armour(String tankName) { | |
this.tankName = tankName; | |
setGun(gun); | |
} |
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 ArrTanks { | |
public Tank[] tanks = new Tank[5]; | |
public void setTanks() { | |
for (int i = 0; i < tanks.length; i++) { | |
tanks[i] = new 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 day1; | |
/** | |
* Created by p.rulov on 11.02.2016. | |
*/ | |
public class GreetingService { | |
public static void main(String[] args) { | |
if (args.length != 0) { | |
System.out.print("Hello "); |
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 tank4you; | |
public class TankLauncher { | |
public static void main(String[] args) { | |
Tank t = new Tank("sand", 4, 56); | |
System.out.println("Tank color is " + t.color + ", crew consist of " + t.crew | |
+ " people, max speed is " + t.maxSpeed + " km/h."); | |
} |
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 day2; | |
public class RoomReport { | |
public class TV { | |
String[] tv = new String[] {"SAMSUNG", "Smart-TV", "LED", "UE40H5500AK", "Full HD", "Glossy Black", "Full Range"}; | |
String tvBrend = tv[0]; | |
String tvKind = tv[1]; | |
String tvType = tv[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
package day2; | |
public class RoomReport { | |
public class TV { | |
String[] tv = new String[] {"SAMSUNG", "Smart-TV", "LED", "UE40H5500AK", "Full HD", "Glossy Black", "Full Range"}; | |
String tvBrend = tv[0]; | |
String tvKind = tv[1]; | |
String tvType = tv[2]; |
NewerOlder