java报错Unresolved compilation problems: ?
本文介绍了java报错Unresolved compilation problems: ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
post cannot be resolved or is not a field
post cannot be resolved to a variable
post cannot be resolved to a variable
post cannot be resolved
这是代码:
public class HelloWorld2 {
public static void main(String[] args) {
Post.post = new Post(); // 创建博客对象
post.title = "aa的博客"; // 访问对象属性
post.content = "这是我的第一篇博客"; // 访问对象属性
post.print(); // 调用对象方法
}
}
看教程来的,都不知道是什么。。。
谢谢!
解决方案
目测第一行是Post post = new Post();
如果不是看错了的话,考虑换个教程吧
这篇关于java报错Unresolved compilation problems: ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文