Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package MobilePhone;
- public class Screen {
- private double size;
- private int colors;
- public Screen(double size, int colors) {
- this.size = size;
- this.colors = colors;
- }
- @Override
- public String toString() {
- return String.format("Size: %.2f\n" +
- "Colors: %d",this.size,this.colors);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement