java矩阵面积_Java基础 矩阵面积
发布日期:2021-06-24 16:13:16
浏览次数:2
分类:技术文章
本文共 602 字,大约阅读时间需要 2 分钟。
提供 数据结构与算法题目 的平台是LintCode,参考链接是:http://www.lintcode.com/zh-cn/
问题描述:
参考代码:
public class Rectangle {
/*
* Define two public attributes width and height of type int.
*/
// write your code here
public int width;
public int height;
/*
* Define a constructor which expects two parameters width and height here.
*/
// write your code here
Rectangle(int width , int height){
this.width = width;
this.height = height;
}
/*
* Define a public method `getArea` which can calculate the area of the
* rectangle and return.
*/
// write your code here
public int getArea(){
return this.width * this.height;
}
}
结果与评价:
转载地址:https://blog.csdn.net/weixin_33744799/article/details/114216641 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
做的很好,不错不错
[***.243.131.199]2024年03月31日 15时04分57秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
【APICloud系列|31】百度导航功能的实现
2019-04-28
【APICloud系列|32】 aMapNavigation高德地图导航的实现
2019-04-28
java实现网上招标系统
2019-04-28
java实现俄罗斯方块项目
2019-04-28
java实现即时通讯软件
2019-04-28
java实现出租车计价器
2019-04-28
Hey,孙叫兽的2020 CSDN年度报告已出炉,请查收!
2019-04-28
Java实现qq截图工具
2019-04-28
java实现儿时的超级玛丽游戏
2019-04-28
java实现飞机大战游戏
2019-04-28
java实现愤怒的小鸟游戏
2019-04-28
java开发一款坦克大战游戏
2019-04-28
IOS 开发技能图谱——ios 开发工程师必知必会要点
2019-04-28
OpenResty学习地图来啦,速速收藏!
2019-04-28
恭喜孙叫兽在CSDN年度之“战”中脱颖而出——喜提一等奖(小米手环+定制勋章)
2019-04-28
【APICloud系列|33】通过程序循环数据集合的时候闭包加入imageCache方法
2019-04-28
【APICloud系列|34】免费使用的ChromeDebug 模块
2019-04-28
【APICloud系列|35】APICLloud开源官方模块
2019-04-28
【APICloud系列|36】 mobVerify免费短信验证码的实现
2019-04-28