Quantcast
Channel: BlogoSfera » contents
Viewing all articles
Browse latest Browse all 16

Text file keeps deleting contents on the file. How do i get around this?

$
0
0

there is some code that has been written up here showing the array int i = 0; try { File fl = new File("Product List.txt"); Scanner scn = new Scanner(fl); while(scn.hasNext()) { String productName = scn.next(); double productPrice = scn.nextDouble(); int productAmount = scn.nextInt(); product[i] = new Products(productName,productPrice,productAmount); i = i + 1; } } […]

The post Text file keeps deleting contents on the file. How do i get around this? appeared first on BlogoSfera.


Viewing all articles
Browse latest Browse all 16

Trending Articles