nattabatt
JCHJava Community | Help. Code. Learn.
•Created by nattabatt on 11/15/2024 in #java-help
My code will only return the perameter
In my unacceptable date method, i have code so far that finds if the year of a date are integers. It works when allowing the user to reenter the date, but the reentered date doesnt go into my txtfile, the original date does. I have used ab24-08-24 to show the incorrect date going into the text file. I return the date outside of a for loop and it returns the first incorrect date written which is the perameter.
8 replies
JCHJava Community | Help. Code. Learn.
•Created by nattabatt on 10/21/2024 in #java-help
isInteger will not seem to work
I am making a work oganization app and focusing on a method that checks if you wrote the date incorrectly and will prompt you to rewrite it if you did. This is in the unacceptabledate method in the file. First I need to make sure that integers are being written in the date. I cant seem to use isInteger though. I tried toString and Integer.parsrInt and tried using isInteger after but nothing has worked. Please help
7 replies
JCHJava Community | Help. Code. Learn.
•Created by nattabatt on 6/14/2024 in #java-help
I cant figure out how to rename a file.
in order to delete from a file I first need to write everything that I don't want to delete into another file and then rename the the new file to the name of the old file. Then I would delete the old file. This is represented in the getDate() method. I am noticing that the new file (temp.txt) refuses to be renamed to the old file (savedata.txt). What should I do
10 replies
JCHJava Community | Help. Code. Learn.
•Created by nattabatt on 5/21/2024 in #java-help
I am getting java.nio.file.NoSuchFileException.
Although the file that is getting this error is in my java project file, when I use print stack trace I get the java.nio.file.NoSuchFileException error. Does anyone maybe know why?
12 replies