Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- class rectangle{
- private int height;
- private int width;
- public setdata (int t, int s)
- {
- height= t;
- width = s;
- }
- public void display(){System.out.println(height+width)}
- }
- public class Main {
- public static void main(String[] args) {
- rectangle.setdata ("");
- rectangle a = new height(t:"101",s"t");
- rectangle b = new width(t:"102",s"y");
- a.display();
- b.display();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement