小编Ash*_*ngh的帖子

为子类的对象使用相同的超类方法

class A {
    void test() {
    }
}

class B extends A {
    void test() {
    }

 public static void main(String[] args)
{
 B b=new B();
//insert code here
}
}
Run Code Online (Sandbox Code Playgroud)

如何test为B 类的对象b调用A类的方法?特别是对象b

java polymorphism

1
推荐指数
1
解决办法
1507
查看次数

Go中的字母数字排序

我正在阅读GAE数据存储区中的行,我想按字母顺序对它们进行排序.

假设我有这样的事情:

key      name      description    sequence  
===========================================  
ASD..    maths1    it is maths    chap21.1  
ASD..    maths2    it is maths    chap21.10  
ASD..    maths3    it is maths    chap21.2  
Run Code Online (Sandbox Code Playgroud)

我希望结果按字母顺序排序在序列字段上,如下所示:

key      name      description    sequence  
===========================================  
ASD..    maths1    it is maths    chap21.1  
ASD..    maths3    it is maths    chap21.2 
ASD..    maths2    it is maths    chap21.10   
Run Code Online (Sandbox Code Playgroud)

google-app-engine go

-1
推荐指数
1
解决办法
493
查看次数

标签 统计

go ×1

google-app-engine ×1

java ×1

polymorphism ×1