精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • JAVA中,寫的Person類的class Person這行提示了The type Person is already defined.的錯(cuò)誤,是什么情況?

    JAVA中,寫的Person類的class Person這行提示了The type Person is already defined.的錯(cuò)誤,是什么情況?
    class Person {
    \x05private String name;
    \x05private int age;
    \x05public void setName(String n) {
    \x05\x05name = n;
    \x05}
    \x05public void setAge(int a) {
    \x05\x05age = a;
    \x05}
    \x05public String getName() {
    \x05\x05return name;
    \x05}
    \x05public int getAge() {
    \x05\x05return age;
    \x05}
    \x05public void tell() {
    \x05\x05System.out.println(getName());
    \x05}
    }
    public class Ccl {
    \x05public static void main(String[] args) {
    \x05\x05Person per = new Person();
    \x05\x05per.setName("Martin");
    \x05\x05per.setAge(30);
    \x05\x05per.tell();
    \x05}
    }
    提示錯(cuò)誤,可以運(yùn)行,但是不管tell()里面的輸出內(nèi)容有幾個(gè),輸出結(jié)果都是Name:MartinAge:30
    其他人氣:353 ℃時(shí)間:2020-05-30 12:23:16
    優(yōu)質(zhì)解答
    別的地方定義了一個(gè)Person類,你在你工程里仔細(xì)找找.
    我來(lái)回答
    類似推薦
    請(qǐng)使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點(diǎn),以保證最佳閱讀效果。本頁(yè)提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版