Hello ..
i wrote this class
and i saved this class in file "BS.java" and i make object in "example.java" and use it :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 when i do compile , it's show for me these errorsCode: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(); } }
example.java:7: cannot resolve symbol
symbol : class BBS
location: class BB.example
BBS MySmartBB = new BBS();
^
where is the problem in code?


Reply With Quote



Bookmarks