标题:The method talk01() is undefined for the type Object
取消只看楼主
ascleft
Rank: 1
等 级:新手上路
帖 子:11
专家分:5
注 册:2013-3-29
 问题点数:0 回复次数:1 
The method talk01() is undefined for the type Object
程序还没写完,这只是其中的一个类,报错的地方我已在下面标记了

talk1是本类的一个实例,已经在main函数中实例化过了

报错的提示是“The method talk01() is undefined for the type
     Object


package com.library.domain;

public class Talk {
    public void talk01(int a){
        switch(a){
        case 1:
            
            break;
        case 2:
            
        default:
            System.out.println("该选项不存在");
        }
    }
   

    public void passsucc(){
        System.out.println("登陆成功!");
    }
    public void passfail(){
        System.out.println("登录失败!");
        System.out.println("跳转回登录页面.....");
        super.talk01();                      就是这里报错,提示内容是“The method talk01() is undefined for the type Object”
    }
    public void pass03(){
   
    }
   
   
   
   
    public void Talk02(int a){
        switch(a){
        case 1:
            
            break;
        case 2:
            
            break;
        case 3:
            
            break;
        case 4:
            
            break;
        case 5:
            
            break;
        case 6:
            
            break;
        default:
            System.out.println("该选项不存在");
        }
        
    }
    public void Talk03(){
        
    }
    public void Talk04(){
        
    }
    public void Talk05(){
        
    }
    public void Talk06(){
        
    }



}
搜索更多相关主题的帖子: package default undefined 
2013-04-10 20:14
ascleft
Rank: 1
等 级:新手上路
帖 子:11
专家分:5
注 册:2013-3-29
得分:0 
节操碎一地啊,应该是用this,刚才抽了。。。。。大家不用回了,毁三观的低级错误。。。。。。
2013-04-10 20:21



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-403687-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.653821 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved