This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi again, this is my last Q for today. I wish to make an object for saving, called saving i supose but my code doesn't work for some reason. It says that it can't resolve the class saving. I can't figure it out, any ideas?Thanks code:
Error Text: --------------------Configuration: <Default>-------------------- C:\JAVA\TabDemo.java:129: cannot resolve symbol symbol : class saving location: class TabDemo saving bookCurrent = new saving(titleTxt.getText(),descTxt.getText()); ^ C:\JAVA\TabDemo.java:129: cannot resolve symbol symbol : class saving location: class TabDemo saving bookCurrent = new saving(titleTxt.getText(),descTxt.getText()); ^ 2 errors
[ March 03, 2005: Message edited by: Berty Ahern ] [ March 03, 2005: Message edited by: Berty Ahern ]
Please post the exact error message you get. Copy and paste is your friend. Also, this will reduce the chance of miscommunication. Many of the important details are lost when you just summarize the error you get.
Also, it would help if you use theUBB code tags when posting your code. This will preserve formatting which makes your code much easier to read. Feel free to go back and edit your original post to do this.
In order for this code to work, you must have already written a class called saving and it must exist in the same subdirectory or package where TabDemo resides. Incidentally, java standard naming conventions indicate that the name of the class should be "Saving", not "saving", as class names are to be capitalized. If you do have a class named "Saving", then your problem is simply spelling the class name wrong, as capitalization does matter in java.
If the "saving" class is in another package such as com.mycompany.util, you must declare an import for the class as in "import com.mycompany.util.saving;"