close
執行結果

--------------------Configuration: --------------------
我們是朋友嗎?
我喜歡你
11
我們是朋友嗎?
我們是朋友嗎?
我喜歡你

Process completed. 編譯成功
程式碼

class aa
{    
    public  aa()
    {
String o="我們是朋友嗎?";
System.out.println(o);
    }
    }

 class bb extends aa
    {
    public  bb()
    {
String f="我喜歡你";
System.out.println(f);
    }
    }
public class te10 extends bb
{
    
    public te10()
    {
int y=5;
int r=6;
int e=y+r;
System.out.println(e);
    }
    
    public static void main(String[] args)
    {
te10 g=new te10();
aa j=new aa();
bb q=new bb();
    
    }
    } 
arrow
arrow
    全站熱搜

    gtea0609 發表在 痞客邦 留言(0) 人氣()