Results 1 to 5 of 5
- 06-12-2008, 05:18 AM #1
Member
- Join Date
- Jun 2008
- Posts
- 2
- Rep Power
- 0
How to save name in Array and Print saved Name
Hi to everyone,
I am learning Java and I had some problem to write in Java code.
I would like to create a new array and want to Save there what I typed. After that I would like to Display. But I don't know how to write to accept array in what I typed. Can anyone help me by writing code.Last edited by ppkkyaw; 06-12-2008 at 05:20 AM.
- 06-12-2008, 06:10 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If I get correctly, you want to save some text in an array and display(read) them later. Right?
Arrays are different. You should know the size of it at the time of initialization. It depends on how many time you want to save. Say you want to save 5 items and display them each time, it's not a case. If it is not, you are in a trouble.
In such a case you have different options. List. If you want to learn more better to read the documentation.
- 06-14-2008, 05:20 AM #3
Member
- Join Date
- Jun 2008
- Posts
- 2
- Rep Power
- 0
Thinks, now I realize my topic is not complete with facts. Truely, I want to enter name and want to save in array until I press one button(example- OK button). After that I want to display them. That is my plan. I am just a student and learning java programming. I want to ask a lot of question in this forum. By the way can you reply this question?
-
I think that you need to greatly clarify your question here. It's still very confusing (at least to me).
- 06-15-2008, 06:44 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
It's confused me too. What you mean "save in array until I press one button"
I'm sure within a few second you are dead. :) You need a huge memory to do it.
What is the purpose of saving and display that entered name. If you want to display the name directly, no need to save it anymore. Until you exit the application you can hold it in a global variable.
So, it's much better to give more details on your question.
Similar Threads
-
Hwlp with "Open", "Save", "Save as..."
By trill in forum New To JavaReplies: 3Last Post: 11-02-2010, 09:26 AM -
How can i save the data Internally(auto save)
By Rama Koti Reddy in forum AWT / SwingReplies: 2Last Post: 11-01-2010, 08:31 PM -
Repaint panel after open saved serialized array
By King8654 in forum AWT / SwingReplies: 1Last Post: 04-24-2008, 09:37 AM -
How can I save my XML
By FrankyDee in forum XMLReplies: 1Last Post: 03-27-2008, 03:59 PM -
returning to a previously saved view
By gojava in forum Advanced JavaReplies: 0Last Post: 11-09-2007, 05:11 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks