what is error with this class ?
Hello ..
i wrote this class
Code:
public class BBS
{
public String name;
public String creator;
public String website;
public BBS(String name, String creator, String website)
{
this.name = name;
this.creator = creator;
this.website = website;
}
public int GetInfo()
{
System.out.println("Bulletin Board System Name is " + this.name);
System.out.println("Bulletin Board System programme is " + this.creator);
System.out.println("More infromation about " + this.name + " at " + this.website);
System.out.println("=========================================================");
return 0;
}
}
and i saved this class in file "BS.java" and i make object in "example.java" and use it :
Code:
package BBS;
public class example
{
public static void main(String[] args)
{
BBS MySmartBB = new BBS("MySmartBB","MaaSTaaR","http://www.mysmartbb.com");
BBS vBulletin = new BBS("vBulletin","Jelsoft Team","http://www.vbulletin.com");
BBS phpBB = new BBS("phpBB","phpBB Team","http://www.phpbb.com");
MySmartBB.GetInfo();
vBulletin.GetInfo();
phpBB.GetInfo();
}
}
and when i do compile , it's show for me these errors
example.java:7: cannot resolve symbol
symbol : class BBS
location: class BB.example
BBS MySmartBB = new BBS();
^
where is the problem in code?