curl命令参数很多,博主很多都没有用过。今天发现可以用-w参数挺好用的。-w:--write-out,作用就是输出点什么。curl的-w参数用于在一次完整且成功的操作后输出指定格式的内容到标准输出。输出格式由普通字符串和任意数量的变量组成,输出变量需要按照%{variable_name}的格式,..
分类:
Web程序 时间:
2016-05-29 23:33:54
阅读次数:
1556
定义白富美接口,类WomanStar实现接口interfaceiRich
{
voidrich();
}
interfaceiWhite
{
voidwhite();
}
interfaceibeaut
{
voidbeaut();
}
classWomanStarimplementsiRich,iWhite,ibeaut
{
publicvoidrich()
{
System.out.println("I‘mbeaut");
}
publicvoidwhite()..
分类:
其他好文 时间:
2016-05-29 23:32:58
阅读次数:
342
一起来打游戏classPlayerextendsThread
{
privateStringname;
privateintsec;
publicPlayer(Stringname,intsec)
{
this.name=name;
this.sec=sec;
}
publicvoidrun()
{
System.out.println("玩家"+name+"出发..");
for(inta=0;a<30;a+=1)
{
System.out...
分类:
编程语言 时间:
2016-05-29 23:32:12
阅读次数:
365
自动装箱:Integeri=12; //===Integeri=newInteger(12);自动拆箱:Integeri=12;i++ //===i.parseInt()=12;++如果不自动拆箱只有inti=i.intValue();System.out.print(i+4);包装类和基本类型区别----------------------1.包装类是对象,默认值是null。2.数字型的基本数据类型是0.3...
分类:
其他好文 时间:
2016-05-29 23:27:43
阅读次数:
236
1、应用程序不必为每个子类编写单独的功能调用,只需要对抽象基类(父类)进行处理即可。以不变应万变2、子类的功能可以被父类的引用变量调用,这个叫做向后兼容。 例如: class A { void Func1(){ System.out.println("A func1 is calling"); } ...
分类:
编程语言 时间:
2016-05-29 22:46:10
阅读次数:
202
Can brain stimulation aid memory and brain health? Harvard Women’s Health Watch Image: Thinkstock The jury is still out, but magnetic fields or mild e ...
分类:
其他好文 时间:
2016-05-29 19:44:20
阅读次数:
198
创建一个bird类 public class Bird implements Flyable{ @Override public void Fly() { // TODO Auto-generated method stub System.out.println(""); }} 创建一个接口带有飞的 ...
分类:
其他好文 时间:
2016-05-29 18:26:04
阅读次数:
146
suspend和resuem也是不建议使用的方法,且使用时很可能引发一些异常。比如suspend某个同步对象,导致该锁无法释法,其他线程访问到该对象时也将无法继续往下执行。最简单的例子可以是System.out.println,这个方法是同步方法,若在线程中执行,且该线程呗suspend,则在main方法..
分类:
编程语言 时间:
2016-05-29 16:52:43
阅读次数:
256
Java语言的起源 Java的发展 Java的技术特点 上机实训 获取键盘录入数据的代码示例: import java.util.Scanner;public class P12 { public static void main(String[] args) { System.out.print( ...
分类:
编程语言 时间:
2016-05-29 16:39:15
阅读次数:
145
在java中,把一个double或者BigDecimal的小数转换为字符串时,经常会用科学计数法表示,而我们一般不想使用科学计数法,可以通过:DecimalFormat a = new DecimalFormat("#,##0.00000000"); System.out.println(a.for ...
分类:
编程语言 时间:
2016-05-29 15:00:17
阅读次数:
195