方法是语句的集合,在一起执行一个功能。 System.out.printIn() System是一个类,out是一个具体对象,printIn()是一个方法。 方法包含在类或者对象中,在其他地方可以被引用。 原子性:原则上一个方法只做一个功能。 public static void main(Stri ...
分类:
编程语言 时间:
2021-03-06 15:03:45
阅读次数:
0
参考:https://www.cnblogs.com/ngy0217/p/9006716.html 饿汉式(线程安全,调用效率高,但不能延时加载): public class ImageLoader{ private static ImageLoader instance = new ImageLo ...
分类:
编程语言 时间:
2021-03-06 14:58:12
阅读次数:
0
 ...
分类:
其他好文 时间:
2021-03-06 14:46:14
阅读次数:
0
package operator; public class Demo01 { public static void main(String[] args) { //二元运算符 //Ctrl+D 复制当前行到下一行 int a=10; int b=20; int c=30; int d=40; Sy ...
分类:
其他好文 时间:
2021-03-06 14:45:10
阅读次数:
0
什么是面向对象 回顾方法的定义与调用 方法的定义 import java.io.IOException; //Demo01 类 public class Demo01 { //main方法 public static void main(String[] args) { } public Strin ...
分类:
编程语言 时间:
2021-03-06 14:43:03
阅读次数:
0
利用循环打印出三角形 public class Demo13 { public static void main(String[] args) { for (int i = 1; i <=5; i++) { for (int d = 5;d>=i;d--){ System.out.print(" " ...
分类:
编程语言 时间:
2021-03-06 14:31:15
阅读次数:
0
组件传参 散记点(父传子) v-bind传入Number,Function,Object等类型 <mycomponent :count="100" :data="{name: "wise"}" :list="['foo','bar']" :action="() => {}"/> 传递组件,组件变量形 ...
分类:
其他好文 时间:
2021-03-06 14:19:47
阅读次数:
0
class Foo { public static $flag_status = array( 'foo', 'bar' ); Const OT_UPGRADE_1 = 1; Const OT_UPGRADE_2 = 2; } // 静态属性 $name_attr = 'flag_status'; ...
分类:
其他好文 时间:
2021-03-05 13:15:20
阅读次数:
0
一维数组的动态和 自己的解法 public static int[] runningSum(int[] nums) { int[] resArr = new int[nums.length]; int temp = 0; for (int i = 0; i < nums.length; i++) { ...
分类:
其他好文 时间:
2021-03-05 13:05:12
阅读次数:
0
import java.io.File; import java.io.IOException; /* 获取指定文件夹下所有文件名并打印输出, */ public class FileDemo01 { public static void main(String[] args) throws IOE ...
分类:
编程语言 时间:
2021-03-04 13:11:12
阅读次数:
0