matthew reid wrote:Boolean from a String or LocalDate from a String. Is it even possible?
Liutauras Vilda wrote:
Why SaleOffer extends Property? SaleOffer IS-A Property? What is that Property?
And please tell now, where exactly your problem is?
Just a thought on this. Isn't this the exact use case where we can directly use serialization?
Why propAddress, propType propArea, numRoom, numToilet numGarage are in SaleOffer class and not in Property?
matthew reid wrote:
s ravi chandran wrote:Check this link: Serialization
This should fulfill your requirement.
Carey Brown wrote:
This is a good suggestion but it depends on the wording of the requirements. If you are required to read/write a TEXT file, then serialization won't be an option. If on the other hand the requirements just say a FILE, then serialization would be an option. Serialization produces a binary file, not a text file.
Edit: For a novice, a delimited text file is probably easier to understand. Write out the fields as strings separated by tabs ('\t''). Then when you read in the file you can set up a Scanner to look for the tabs, or read line by line and use String.split("\t") to breakout the fields.
Do you know how to look up methods in Javadocs API ? If not, it is a crucial step in learning to code in Java.
All things are lawful, but not all things are profitable.
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|