2 Star 0 Fork 0

热门极速下载/hello-java

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
VariablesAndConstants.java 833 Bytes
一键复制 编辑 原始数据 按行查看 历史
Brais Moure 提交于 2个月前 . Clase 3 | 17/04/2025
package basic.c01_beginner;
/*
Clase 2 - Comentarios, Variables, Constantes, Tipos de datos y Operadores (09/04/2025)
Vídeo: https://www.twitch.tv/videos/2428998601
*/
public class VariablesAndConstants {
public static void main(String[] args) {
// Variables
String name = "Brais";
System.out.println(name);
name = "MoureDev";
System.out.println(name);
// name = 37; Error (no podemos cambiar el tipo de dato)
int age = 37;
System.out.println(age);
var email = "mouredev@gmail.com";
System.out.println(email);
var year = 2025;
System.out.println(year);
// Constantes
final String EMAIL = "mouredev@gmail.com";
// EMAIL = "brais@gmail.com"; Es constante
System.out.println(EMAIL);
}
}
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

搜索帮助