巧匠冷颜

2020年5月9日 #

字符串比较

摘要: 代码如下: String str1 = new String("hello"); String str2 = new String("hello"); String str3 = "hello"; String str4 = "hello"; System.out.println(str1==str 阅读全文

posted @ 2020-05-09 12:36 巧匠冷颜 阅读(322) 评论(0) 推荐(0)

练习

摘要: 一维数组线性查找法 public static void main(String[] args) { Scanner input = new Scanner(System.in); int[] array = {11,23,234,12,3,45,21,233,23,32,123,321}; Sys 阅读全文

posted @ 2020-05-09 12:11 巧匠冷颜 阅读(122) 评论(0) 推荐(0)

public static void main(String[] args) {}详解

摘要: public static void main(String[] args)是java程序的入口地址,java虚拟机运行程序的时候首先找的就是main方法。 一、“public”表示程序属的访问权限,表示的是任何的场合可以被引用 二、“static”表示方法是静态的,不依赖类的对象的 三、“void 阅读全文

posted @ 2020-05-09 10:47 巧匠冷颜 阅读(4806) 评论(0) 推荐(0)

导航