Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-12-2008, 06:18 AM
Member
 
Join Date: Jun 2008
Posts: 2
ppkkyaw is on a distinguished road
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 06:20 AM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-12-2008, 07:10 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,065
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-14-2008, 06:20 AM
Member
 
Join Date: Jun 2008
Posts: 2
ppkkyaw is on a distinguished road
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?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-14-2008, 02:52 PM
Senior Member
 
Join Date: Jun 2008
Posts: 220
Fubarable is on a distinguished road
I think that you need to greatly clarify your question here. It's still very confusing (at least to me).
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 06-15-2008, 07:44 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,065
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Repaint panel after open saved serialized array King8654 AWT / Swing 1 04-24-2008 10:37 AM
How can I save my XML FrankyDee XML 1 03-27-2008 04:59 PM
How can i save the data Internally(auto save) Rama Koti Reddy AWT / Swing 0 12-10-2007 02:46 PM
returning to a previously saved view gojava Advanced Java 0 11-09-2007 06:11 PM
Hwlp with "Open", "Save", "Save as..." trill New To Java 1 07-31-2007 08:53 AM


All times are GMT +3. The time now is 12:43 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org