class Main {
public static void main (String[] args){
long value = 1024 * 1024 * 1024 * 80;
System.out.println(Long.MAX_VALUE);
System.out.println(value);
}
}
Run Code Online (Sandbox Code Playgroud)
输出是:
9223372036854775807 0
这是正确的long value = 1024 * 1024 * 1024 * 80L;
!
在Bash脚本中,以下代码段之间有什么区别?
1)使用单个括号:
if [ "$1" = VALUE ] ; then
# code
fi
Run Code Online (Sandbox Code Playgroud)
2)使用双括号:
if [[ "$1" = VALUE ]] ; then
# code
fi
Run Code Online (Sandbox Code Playgroud) 读取文件特定行的最佳方法(更好的性能)是什么?目前,我正在使用以下命令行:
head -line_number file_name | tail -1
Run Code Online (Sandbox Code Playgroud)
ps.:优先使用shell工具.
当使用java反编译器(http://java.decompiler.free.fr/)反编译一个特定的jar时,我得到了一些奇怪的代码,我无法识别它是什么.有人能帮我吗?代码是这样的:
Foo.access$004(Foo.this);
Run Code Online (Sandbox Code Playgroud)
或这个
Bar.access$006(Bar.this);
Run Code Online (Sandbox Code Playgroud)
要不然
Baz.access$102(Baz.this, true)
Run Code Online (Sandbox Code Playgroud)
这些方法是什么access$004
,access$006
并且access$102
?
有什么问题是以下方法?
def someMethod(funcs: => Option[String]*) = {
...
}
Run Code Online (Sandbox Code Playgroud)