2 Star 0 Fork 0

热门极速下载/hello-java

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Classes.java 691 Bytes
一键复制 编辑 原始数据 按行查看 历史
Brais Moure 提交于 1个月前 . Clase 6 | 14/05/2025
package basic.c08_oop;
/*
Clase 6 - Clases, encapsulamiento y herencia (14/05/2025)
Vídeo: https://www.twitch.tv/videos/2459212698
*/
public class Classes {
public static void main(String[] args) {
var person = new Person("Brais", -38, "123456789A");
// person.name = "Brais";
// person.age = 38;
person.sayHello();
person.name = "Brais Moure";
System.out.println(person.name);
// person.id = "123456789A";
System.out.println(person.getId());
person.setAge(38);
System.out.println(person.getAge());
var person2 = new Person("MoureDev", 18, "123456789B");
person2.sayHello();
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_trending/hello-java.git
git@gitee.com:mirrors_trending/hello-java.git
mirrors_trending
hello-java
hello-java
main

搜索帮助