随笔分类 -  编程语言

摘要:继承: public class Super { public static void main(String[]args){ new son().f(); } } class Father{ public int value; public void f(){ value=100; System. 阅读全文
posted @ 2022-03-23 15:51 Theext 阅读(28) 评论(0) 推荐(0)
摘要:1. 向量 向量(vector)是用于存储数值型、字符型、逻辑型数据的一维数组。标量可以看作是 只含有一个元素的向量。 函数c( )可用来创建向量,例如: In [2]: x1 <- c(2, 4, 1, -2, 5) x2 <- c("one", "two", "three") x3 <- c(T 阅读全文
posted @ 2022-03-23 15:05 Theext 阅读(1446) 评论(0) 推荐(0)
摘要:实例化同名对象时赋值 public class User { int id; String name; String pwd; public User(){} public User(int id ,String name){ super(); this.id=id; this.name=name; 阅读全文
posted @ 2022-03-21 13:00 Theext 阅读(38) 评论(0) 推荐(0)
摘要:实例一: public class people { public static void main(String[] args) { person p1 = new person();//实例化一个人,p1 p1.name = "张三"; p1.age = 24; p1.hight = 170; 阅读全文
posted @ 2022-03-21 00:18 Theext 阅读(63) 评论(0) 推荐(0)
摘要:九九乘法表 public class jiujiu { public static void main(String[] args){ for(int i=1;i<=9;i++){ for(int j=1;j<=i;j++){ System.out.print(j+"*"+i+"="+(i*j<10 阅读全文
posted @ 2022-03-21 00:06 Theext 阅读(40) 评论(0) 推荐(0)
摘要:空 阅读全文
posted @ 2021-09-02 18:04 Theext 阅读(43) 评论(0) 推荐(0)
摘要:空 阅读全文
posted @ 2021-09-02 18:01 Theext 阅读(22) 评论(0) 推荐(0)
摘要:提供Java编程的基本语句,方便查阅编程的代码格式: import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class tr { public static void main(Stri 阅读全文
posted @ 2021-09-02 18:00 Theext 阅读(244) 评论(0) 推荐(0)