小编web*_*777的帖子

this:不能在静态上下文中使用它

你能帮我解决下面的代码吗?错误是:"无法在静态上下文中使用它"

public class Sample2 {
    /**
     * @param args
     */
    public static void main(String[] args) 
    {
        Sample2 sam=new Sample2();  

        //Below code works fine
        System.out.println(sam);

        //Below code is displaying error
        System.out.println(this);
    }
}
Run Code Online (Sandbox Code Playgroud)

java this

20
推荐指数
2
解决办法
7万
查看次数

在eclipse中将代码提交到CVS而不在服务器端更新

我在代码库CVS中的代码.我已将代码下载到我的eclipse中.当我在eclipse中提交更改时,在我编写CVS更新命令之前,它不会影响CVS中的代码.我认为在CVSROOT/loginfo中需要将一些代码添加到此文件中.你能帮忙吗?

eclipse cvs

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

标签 统计

cvs ×1

eclipse ×1

java ×1

this ×1