473,508 Members | 2,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help me to solve this problem

1 New Member
I have a File type array which is converted one by one into String type now i want to make an array of all converted string. Don't know how to and stuck here

Expand|Select|Wrap|Line Numbers
  1. FTPFile[] files = client.list();
  2. for (FTPFile file : files) {
  3.       System.out.println(file.getName());
  4. //How to make an array of file.getName
  5.  
Aug 29 '14 #1
1 1393
Luuk
1,047 Recognized Expert Top Contributor
i'm new too java too, but something like this (untested):
Expand|Select|Wrap|Line Numbers
  1.  
  2.     String[] strings ;
  3.     int i = 0;
  4.     FTPFile[] files = client.list();
  5.     for (FTPFile file : files) {
  6.           System.out.println(file.getName());
  7.           strings[i++] = file.getName();
  8.     //How to make an array of file.getName
  9.  
  10.  
  11.  
Aug 29 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3029
by: Andrej Hocevar | last post by:
Hello, below I've attached a test program reading data from a file and storing that information in a linked list. First problem is that current->p_name will print only the last item in the file...
0
921
by: chris | last post by:
hi..i have the following links to link my help file from my web application. <A href="#" onClick="window.showHelp('d:\\Help\\kdkhelp.chm')"> <----- at first it works fine..but then later i...
6
2478
by: Federico | last post by:
Hi, this is what I can do: - Create new solutions using VS.Net ASP.Net - Save the solutions, build the solution, view in browser with the solution still open. But, once I close the solution, I...
0
1320
by: Jitesh | last post by:
I am facing a problem in webservice, I want to know what will be the exact procedure to solve the problem............. What I want to do............ I have a table named order in SQL Server....
4
8392
by: skinnybloke | last post by:
Hi - I am having problems witrh the code below (obviously) coming up with illegal character for various characters within the field name which is: S_Gift Finder1_0 I have tried various ways...
7
1597
by: MLH | last post by:
Would love to be able to click on any If-statement and launch a utility that would find what A97 believes to be its corresponding EndIf. Such a tool would save me lots of time as I am forever...
1
1661
by: gkellymail | last post by:
I currently have a class with 29 data adapters and I will probably add a few more as time goes on. When I was testing earlier, i had 28 of them pointing to one connection and 1 pointing to a...
1
1800
by: | last post by:
In the form cs: form() { Thisfrm = this; } .... .... public delegate void delegateWriteDetail (string str); private void WriteDetailScreen(string str) {
5
1810
by: rsingh | last post by:
HI guies can u help me to solve this problem. Write a program that prints a table of the binary equivalents of the decimal numbers in the range 1 through 256.
3
1687
by: vagandhi | last post by:
Hello friends, I am having problem while running below program. If anyone can help me.... // create class car #include<conio.h> #include<iostream.h> #include<stdio.h> // class declaration
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5625
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.