0%

Mac安装homebrew(国内用户)

国内用户安装homebrew经常会因为网络问题安装失败,使用如下命令可以解决

1
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

此行命令来源于:金牛肖马

1.类加载运行全过程

当我们用Java命令运行某个类的main函数启动程序时,首先需要通过类加载器把主类加载到JVM

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class Math {
public static final int initData = 666;
public static User user = new User();

public int compute() { //一个方法对应一块栈帧内存区域
int a = 1;
int b = 2;
int c = (a + b) * 10;
return c;
}

public static void main(String[] args) {
Math math = new Math();
math.compute();
}

}
阅读全文 »