0

Greetings reader,
Thank you for your time.
This post contains 2 Inquiries.

My resources: BlueJ

Inquire 1:

I would like to know what methods (if any) I can use to save anything generated by my BlueJ (e.g returned ints)to my PC's memory without having to create a .txt file somewhere, and of course be able to load them again when I reopen the project with BlueJ.
If such method exist what are the risks I should be aware of?


Inquire 2: (I think that the answer is no but I want to be sure)

Can I create a .txt file named for example "Text number 1" by any method on java?

What I mean is roughly

import java.Something;
Something x = new Something();

x.CreateTextfile(String nameOfFile, String locationOffile) // creates a .txt file at the given location

Why not?


Thank you.

Sincerly,

B.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by peter_budo
0

You are missing on basic knowledge of difference between RAM and HDD. What ever is in memory it get lost after you shut down machine, in case of HDD it can be retrieved and accessed again when need it. So that is definitive NO for first one.

Second, you can create file with class File and you best have look on Java Basic I/O

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.