Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class program {
- public static void main(String[] args) throws Exception {
- phone myPh = new phone();
- myPh.brand = "Samsung";
- myPh.color = "black";
- myPh.battery = 4000;
- myPh.power = 1564;
- myPh.printInfo();
- phone yourPh = new phone();
- yourPh.brand = "Apple";
- yourPh.color = "white";
- yourPh.battery = 980;
- yourPh.power = 170;
- yourPh.put(1000);
- yourPh.printInfo();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement