⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rect.java

📁 java内存分配演示程序
💻 JAVA
字号:
package com.ysu.cwy;

public class Rect {
	private int x=0,y=0;             //左上角坐标
	private int width=0,highth=0;    //矩形宽度和高度
	
	//无参构造函数
	public Rect(int y,int highth) {
		super();
		this.x = 10;
		this.y = y;
		this.highth = highth;
		this.width=100;
	}
	
	//有参构造函数
	public Rect(int x, int y, int width, int highth) {
		super();
		this.x = x;
		this.y = y;
		this.width = width;
		this.highth = highth;
	}

	public int getHighth() {
		return highth;
	}

	public void setHighth(int highth) {
		this.highth = highth;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}
	

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -