随笔分类 - java
摘要:一、卸载java1.8 001、查看系统 [root@pc1 home]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) 002、查看当前的java版本 [root@pc1 home]# java -version open
阅读全文
摘要:001、系统 [root@PC1 gatk-4.1.9.0]# cat /etc/redhat-release AlmaLinux release 9.1 (Lime Lynx) 002、测试java命令 [root@PC1 test]# java bash: java: command not f
阅读全文
摘要:1、 [root@centos7 test5]# ls test.java [root@centos7 test5]# cat test.java class Dog{ ## 类 int size; String breed; String name; void bark() { System.ou
阅读全文
摘要:类是对象的抽象定义,对象是类的具体实例。 类就是对象???? 对象就是类???
阅读全文
摘要:1、java编译报错 error: reached end of file while parsing 2、出现这种报错的原因是括号没有成对,检查源代码: 补全括号,保存退出: 3、再次编译、执行 [root@centos7 test5]# ls test.java [root@centos7 te
阅读全文
摘要:1、 [root@centos7 test5]# ls first.java [root@centos7 test5]# cat first.java ## 源文件 public class first{ ##类名为first public static void main(String[] arg
阅读全文
摘要:第一个java程序。 package hello; public class Hello { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Hello W
阅读全文