473,666 Members | 2,060 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 1400
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
3042
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 for each item. Where is the problem? Is it in the sscanf? Whay can't I abandon tmp_name and just use p_name instead in that sscanf? Second, the order of the output (with a file of 3 lines) is 1, 2, 0, why? And why is the item 0 empty? I'm new to...
0
928
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 could not view the help file and it prompt with a msg saying access is denied. "help topic for modal dialogs cannot be shown whole internet explorer is being debugged and is in a break mode..how do i solve this?
6
2487
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 can not open it again in VS.Net2003 because it hangs my machine (the whole machine stops responding and there's no alternative but to reboot it!). I can't either browse the created solution because it also hangs the whole machine.
0
1329
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. There are some fields including OrderID, DomainNameURL, SessionID. I want to create a webservice which takes a parameter(SessionID) and return the details from order table. Here OrderId works as a Unique key. but In some cases when SessionID is not...
4
8399
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 of escaping the characters but to no avail. I am unable to change the name of the field as it it comes from an
7
1607
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 botching them up and having to go back 'n fix 'em.
1
1669
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 different one by mistake. This really caused some confusion for a while. What I would like to do is use reflection to have the object scan itself and pick out all of the data adapters and then for each set the connection for all of the various...
1
1821
by: | last post by:
In the form cs: form() { Thisfrm = this; } .... .... public delegate void delegateWriteDetail (string str); private void WriteDetailScreen(string str) {
5
1820
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
1699
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
8448
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.