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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.