Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 29th, 2012, 9:08 AM   #11
PaCkEtPiRaTe
Software Developer
 
PaCkEtPiRaTe's Avatar
 
Join Date: Aug 2007
Location: Massachusetts, USA
Posts: 696
Rep Power: 7 PaCkEtPiRaTe will become famous soon enough
Send a message via AIM to PaCkEtPiRaTe Send a message via Skype™ to PaCkEtPiRaTe
Re: Problem Reading a File

Quote:
Originally Posted by macteki View Post
It worked because showInputDialog() is expecting String array instead of Object array. If you passed an object array into it, the default "toString()" method would be called, which is implementation dependent.



There are two method declaration for toArray() in java.util.Set

1. Object[] toArray()
Returns an array containing all of the elements in this set.

2. <T> T[] toArray(T[] a)
Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array.

See this link for reference.

http://docs.oracle.com/javase/6/docs.../util/Set.html
I guess I must have missed that in the list of methods in Netbeans. Any idea on what's causing the other problem?
__________________
I'm trying to change the world, but I can't find the source code...
PaCkEtPiRaTe is offline   Reply With Quote
Old Jun 29th, 2012, 10:26 AM   #12
PaCkEtPiRaTe
Software Developer
 
PaCkEtPiRaTe's Avatar
 
Join Date: Aug 2007
Location: Massachusetts, USA
Posts: 696
Rep Power: 7 PaCkEtPiRaTe will become famous soon enough
Send a message via AIM to PaCkEtPiRaTe Send a message via Skype™ to PaCkEtPiRaTe
Re: Problem Reading a File

Nevermind. I guess I should have realized it was the same problem with the same solution. It's fixed now. Thanks so much.
__________________
I'm trying to change the world, but I can't find the source code...
PaCkEtPiRaTe is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in reading image file ramhanuman Java 0 Apr 3rd, 2011 1:52 PM
DOS batch file to FTP download files by reading from the text file. Abhijat_PF Other Programming Languages 1 Sep 14th, 2010 2:48 PM
reading problem from file called "INPUT" singh C 2 Jan 30th, 2010 7:31 AM
c++ reading from a file ... programmingnoob C++ 8 Apr 22nd, 2006 6:17 PM
reading in a file in java ryanl Java 3 Sep 8th, 2005 9:54 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:00 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC