1 2 3 4 5 6 7 8
class Power{ static int maxPower=350; static int usedPower=0; int powerValue=0; public static void setPower(powerable device){ device.powerLvl=200; System.out.println("after changing "+device.needeblePower); }