[英]The type java.lang.Charsequence cannot be resolved. It is indirectly referenced from required.class files
I know this question was asked on here but it was related to something different. 我知道这个问题,有人问在这里,但它涉及到不同的东西。 This is my program, I had to create my own class.
这是我的程序,我必须创建自己的类。 Also, when I try to use the system.out.printf () function, it doesnt work how come?
另外,当我尝试使用system.out.printf()函数时,它为什么不起作用? Thank you, from a very lost beginner programmer.
谢谢您,我是一个非常失落的初学者程序员。 :
:
public class IDInfo {
public static void main(String[] args){
}
private double name;
private double studentID;
private double Major;
private double CreditsNeeded;
private double CreditsTaken;
String getName = "Alex Wilson";
String getID = "916183391";
String getMajor1 = "Biochemistry";
String getCreditsNeeded = "128";
String getCreditsTaken = "14";
public void setname ( double name )
{
name = name;
}
public void setstudentID (double ID)
{
studentID = ID;
}
public void setMajor (double Major)
{
Major=Major;
}
public void setCreditsNeeded (double CreditsNeeded)
{
CreditsNeeded=CreditsNeeded;
}
public void setCreditsTaken (double CreditsTaken)
{
CreditsTaken=CreditsTaken;
}
public double getName()
{
return name;
}
public double getID ()
{
return studentID;
}
public double getMajor ()
{
return Major;
}
public double getCreditsNeeded ()
{
return CreditsNeeded;
}
public double getCreditsTaken ()
{
return CreditsTaken;
}
public double getCreditsRemaining ()
{
return CreditsNeeded - CreditsTaken;
}
{
}}
Java is a case sensitive language, so make sure your references are correct. Java是区分大小写的语言,因此请确保您的引用正确。 I would also suggest reading about the naming conventions , as what you have shown is very inconsistent.
我还建议您阅读有关命名约定的内容 ,因为您所显示的内容非常不一致。
The issue seems with the compiler. 该问题似乎与编译器有关。 If you are using jdk 8, I would suggest rolling back compiler to jdk 7 and rebuild the code.
如果您使用的是jdk 8,我建议将编译器回滚到jdk 7并重建代码。
Some more places to consider - 还有更多地方值得考虑-
If you are using any of the following release of eclipse 如果您使用以下任何版本的eclipse
Helios doesn't support Java 8 at all. Helios完全不支持Java 8。 Kepler doesn't support it by default.
开普勒默认情况下不支持它。 But eclipse have released patch for the same.
但是Eclipse已经发布了相同的补丁。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.