class Threadxx extends Thread{
.....
}
public class testThread
{
 public static void main(String[] args){
      Threadxx thread1=new Threadxx();
       thread1.start();
}
}
这里的thread1是类的实例吗?

解决方案 »

  1.   

    老兄刚学Java么?不用急慢慢来,这个是类的实例,加油!
      

  2.   

    答案是肯定的。子类对象是父类的实列,父类对象不是子类的实列。当然如果你把子类对象赋值给父类对象,那么在这种情况下,
    父类对象就是子类的实列了。建议看看 孙鑫关于 学习java无难事 这个视频,看了很多东西自然就明白了,
      

  3.   

     对象的实例化!!
    利用 static 可以不用实例化!!
    public class RotateArray{
    public static void reverse(int[]array,int start,int end){
    if(start>array.length||end>array.length){
    System.out.println("the number out of Bounds");
    return;
    }
    while(start<end){
    int temp;
    temp=array[start];
    array[start]=array[end];
    array[end]=temp;
    start++;
    end--;
    }
       }
       public static void main (String[]args){
        int[] a=new int[]{0,1,2,3,4,5,6,7,8,9,10};
        int b=a.length;
        RotateArray.reverse(a,0,5);
        RotateArray.reverse(a,6,b-1);
        RotateArray.reverse(a,0,b-1);
        for(int i=0;i<b;i++){
        System.out.print(a[i]+" ");
        }
        }
       }