1.class MyThread extends Thread{
private int a;
public void run(){
for( ; a
System.out.println(getName() + " " + a);
}
}
public static void main(String [ ] args){
MyThread one = new MyThre...
分类:
编程语言 时间:
2014-12-02 09:00:58
阅读次数:
201
代码提示:比如你打syso就输出System.out.println();这样功能的快捷键默认是alt+/,当然也可以修改eclipse快捷键大全1.常用快捷键(1)Ctrl+Space说明:内容助理。提供对方法,变量,参数,javadoc等得提示,应运在多种场合,总之需要提示的时候可先按此快捷键。注:避免输入法的切换设..
分类:
系统相关 时间:
2014-12-02 00:19:26
阅读次数:
302
1.深入synchronized关键字
class Service{
public void fun1(){
synchronized(this){
try{
Thread.sleep(3 * 1000);
}catch(Exception e){
System.out.println(e);
}
System.outprintln(fun1);
...
分类:
其他好文 时间:
2014-12-01 17:47:01
阅读次数:
176
你看到的这个文章来自于http://www.cnblogs.com/ayanmwphp代码很简单:$server="127.0.0.1";println("Begin");$link = mysql_connect($server,"mysql","mysql");if (!$link) { ...
分类:
数据库 时间:
2014-12-01 14:14:30
阅读次数:
191
练习1
/**
* 第10章
* 练习1
* @author zhtt
*
*/
public class Test {
public static void main(String[] args) {
Outer outer=new Outer();
Outer.Inner inner=outer.getInner();
System.out.println...
分类:
编程语言 时间:
2014-12-01 10:11:24
阅读次数:
164
一.申明,分配空间int [] scores=new int[5];二.遍历二维数组遍历for(int i=0;i<scores.length;i++){ for(int j=0;j<scores[i].length;j++){ System.out.println(scores[i][j]);}}
分类:
编程语言 时间:
2014-12-01 06:27:18
阅读次数:
226
class Car{ int num; String color; void run() { System.out.println(num+"..."+color); }}new Car().num = 5;匿名对象:没有名字的对象new Car(...
分类:
其他好文 时间:
2014-12-01 00:42:21
阅读次数:
229
类的继承
public class Fruit{
public double weight;
public void info(){
System.out.println("水果"+weight);
}
}
public class Apple extends Fruit{
public static void main(String[] args){
//创建Apple对象...
分类:
其他好文 时间:
2014-11-29 12:00:51
阅读次数:
132
//通过super调用父类构造方法和隐藏方法package mypack;class Father { public Father() { // TODO Auto-generated constructor stub System.out.println("null father"); } p.....
分类:
编程语言 时间:
2014-11-29 10:05:15
阅读次数:
173
我们在写Go代码的时候经常用到import这个命令用来导入包文件,而我们经常看到的方式参考如下:import( "fmt")然后我们代码里面可以通过如下的方式调用fmt.Println("hello world")上面这个fmt是Go语言的标准库,他其实是去goroot下去加载该模块,当然Go...
分类:
其他好文 时间:
2014-11-29 00:10:13
阅读次数:
188