Urgent!!!   Problem on the String method and File method

I would like to ask two questions:
(1) From the String method, it can use .equals() method to compare two strings whether two string exactly equal or not. But what method can i use to compare two strings see whether any words exists in the string?
(2) From the following code,
Java.io.File outFile = new java.io.File("TestProg.java");If i would like to use a variable (e.g. let the variable be name) instead of the filename "TestProg.java", do you know how to revise the above code??
If i write as following, is it correct???
Java.io.File outFile = new java.io.File(""+name+"");Please help!!!

1- To check whether a word (sunstring) exists in a longer string, you can use the following String method:
indexOf(substring) on the string that you are searching. If the word does not exist, -1 is returned.
2- yes you can provide a variable (of type string) in the constrcutor of File.

Similar Messages

  • Problem with the Labview PDA and file transfer.

    I�m using PALM Tungsten T3 to run some applications. The OS environment is Windows XP. When I try to download a data.txt or data.dat file to the pc using the Hotsync, it gives me an error. There is installed datalogmgr that is the application that allows files exchange between Palm & PC.
    Error message
    Se ha iniciado la sincronización HotSync 03/09/04 16:12:12
    Aceptar Calendario

    fopen(C:\PDAdata\19_samples.txt) failed
    LabVIEW Datalog Conduit ha fallado la sincronización
    I have installed the LVPDA_Patch_70f1.rar file (in the correct order). I tried also with another file generated by PDATempData (in the examples) and it didn�t work. I tried Also to delete datalogmgr and download it again. I tried to instal
    ll Labview COnduit again. Any idea?

    I know its been a long time since your post. Did you make sure to have the directory that you want the file transferred into created on your PC before the sync. If the folder isn't there you will get that error.
    Dan
    Don't drive angry. Don't drive angry!

  • Hello Guys. I had problems in the Computer before and changed my HD. I saved in my all files documents in (Time Capsule). How can I put all my files, pictures documents on my new HD? Please Help. Thank You

    Hello Guys.
    I had problems in the Computer before and changed my HD. I saved in my all files documents in (Time Capsule). How can I put all my files, pictures documents on my new HD?
    Please Help.
    Thank You
    Julio Skov

    Hey
    Thank you very much for replay.
    Would you explain to me how can I do?
    I don't really understand these processes.
    Thak you very much
    Julio

  • The ipad won't sync some photos, saying the file can't be read by the ipad, however it will sync some photos taken at the same time which are the same size and file type.  Why does it reject some and accept others?

    The ipad won't sync some photos, saying the file can't be read by the ipad, however it will sync some photos taken at the same time which are the same size and file type.  Why does it reject some and accept others?

    Hi there. I'm having the same problem: my iPad won't import some photos from a folder, saying that they can't be read. They are all JPEGS and some photos taken at the same time have synched fine, but out of a folder with 200 photos, it only lets me synch 37. I'm synching albums created via Photoshop Elements 6, which has worked fine until now.
    I've tried deleting all photos and re-synching, and have also deleted the iPod Photo Cache, but it hasn't made a difference.
    The iPad auto-updated to the latest version of iTunes, so maybe that's what's causing it?
    Any advice gratefully received!

  • I'm Having problems with the video freezing and the sound carrying on since I up graded my iPad to ios8  BBC IPLAYER

    I Am having problems with the video freezing and the sound carrying on whilst watching BBC IPLAYER ITV PLAYER until I reboot video and the problem acures again

    Your Mac runs maintenance in the background for you.
    Command + R gives you access to restore, repair, or reformat the drive using OS X Recovery
    No idea why that was suggested.
    You may have a third party video player installed that's causing an incompatibility issue.
    Check these folders:
    /Library/Internet Plug-Ins/
    /Library/Input Methods/
    /Library/InputManagers/
    /Library/ScriptingAdditions
    ~/Library/Internet Plug-Ins/
    ~/Library/Input Methods/
    ~/Library/InputManagers/
    ~/Library/ScriptingAdditions
    The first four locations listed are in the root-level Library on your hard disk, not the user-level Library in your Home folder.The tilde (~) represents your Home folder.
    To access the Home folder in OS X Lion or Mountain Lion, open the Finder, hold the Option key, and chooseGo > Library.

  • Hi, I have a problem on the ipod with this file "metadata_never_index". My PC doesn't recognise it. I need the program Apple Spotlight but I can't download it as well. Why? Any solution?

    Hi, I have a problem on the ipod with this file "metadata_never_index". My PC doesn't recognise it. I need the program Apple Spotlight but I can't download it as well. Why? Any solution?

    I am not doing it in ITunes, but i did down load the song from ITunes.  I loaded the song on to my Nano, but in my menu selections it doesn't show the song or the artist in any search format.  However, when i plug in my nano to my PC I see the Nano library on my PC drive listings and that song and artist are there.  I can click on the song and it will play in Windows media on my work PC.  I did notice that the format for most all the songs in my library on my Nano are MPEG - 4 audio Files. 
    Thanks for your help, Mel

  • I have connection problems between the mini ipad and my powerbook g4, you are not allowed to see or share applications.

    I have connection problems between the mini ipad and my powerbook g4, you are not allowed to see or share applications.

    That is not possible.

  • I have a problem with the effect gallery and the saving libraries in Illustrator CS6

    Hi everybody
    I have a problem with the effect gallery and the saving libraries in Illustrator
    1. When you go to to effects > effect Gallery the the sketch filter always is black and white. Is this normal? In Photoshop you can set your background and foreground and the sketch effects takes those colors. Is there any way to do this in Illustrator? I have tried changing the colour of the fill and stroke but nothing...
    2. In the same area as before effects > effect Gallery .... In Photoshop you can add multiple filters with the create new button. Always is off is there anyway to make it available? or the only way is to by creating several individual ones and manage then in the appearance panel ...
    3. I saved a brush library and now it appears in the user defined area so I can get it in any document, that is good but any one knows how to delete a user undefined library?
    Many thanks in advance for the help .... I look forward for the reply =)

    I see that it is six months ago that I first posted this. Nothing has changed. When I use affixa to create a message with an attachment from my gmail account in firefox, the message is created in drafts, but the gmail window is closed and I have to re-open it. Not critical, but annoying.
    Now there is a plug-in on the affixa site that is supposed to be designed for Firefox, and which affixa support claims should take care of this. And I've downloaded it twice. When you download it and open it, it says that it will be installed when Firefox restarts, and gives you a button to restart Firefox. But after you click that button and firefox disappears and re-appears, the affixa plug-in is NOT in the plugin list.
    Please, somebody, HELP.

  • Does anyone have problems using the  highlights, shadows and sharpness edits in iphoto? Since I uploaded Mountain Lion, those editing tabs do not work!

    Does anyone have problems using the highlights, shadows and sharpness controls in iphoto 11? Since I uploaded Mountain Lion on my
    mac mini, those editing features no longer work!!!!

    Sorry, I booted into 10.8 just to test this, but I only have iPhoto 08.

  • I bought the APP Sasol Birds. 146MB of the 147,5MB downloaded without any problem. The download stopped and first the error code 3259 and later the error code 8012 appeared. Can someone help? I want the download to be completed. Thank you. Pieter Strobos

    I bought the APP Sasol Birds. 146MB of the 147,5MB downloaded without any problem. The download stopped and first the error code 3259 and later the error code 8012 appeared. Can someone help? I want the download to be completed. Thank you. Pieter Strobos

    Maybe your firewall or security software are preventing the download from finishing. You could try disabling them until you finish the download

  • I have a problem in the email alerts and Twitter and other applications in ios 7

    I have a problem in the email alerts and Twitter and other applications in ios 7
    push notifications not working

    If you don't have access to your rescue email address (you won't be able to change it until you can answer 2 of your questions) then see if the instructions on this user tip helps you get the questions reset : https://discussions.apple.com/docs/DOC-4551

  • Apple new macbook pro dosent have a disk drive. Does the older model have a problem with the disc drive and so is removed in the new model?

    apple new macbook pro dosent have a disk drive. Does the older model have a problem with the disc drive and so is removed in the new model?

    No. Apple replaced the disk drive with a solid state drive (SSD) instead. The SSD is faster the old disk drive.
    Allan

  • I'm having a problem with the application Dropbox and I want to uninstall it. In finder it does not allow me to move it to trash telling me the dopbox application is open. How do I close it? when it shows up nowhere as an open application?

    I'm having a problem with the application Dropbox and I want to uninstall it. In finder it does not allow me to move it to trash telling me the dopbox application is open. How do I close it? when it shows up nowhere as an open application?

    Is there a DropBox icon up in the menubar you can click on & see quit DropBox?
    https://www.dropbox.com/help/41

  • I fixed the problem with the whole 'waiting' and not loading but now some of my apps won't open, what can I do?

    I fixed the problem with the whole 'waiting' and not loading but now some of my apps won't open, what can I do?

    - Try a reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Purchase/install any new app
    - Try the remaining items of:
    iOS: Troubleshooting applications purchased from the App Store

  • What is the best program and/or method to have crisp clear text in FCP?

    What is the best program and/or method to have crisp clear text in FCP?
    I have the CS4 Production suite.
    Thanks

    What is the best work flow to use? For example creating text in Motion, AE, PS, or AI and then bringing it into FCP.
    I used Motion and the text looks jagged. I though Motion was vector based and I don't understand why the edges aren't crisp and smooth.
    I'm just starting to learn these programs and want to create good working habits.

Maybe you are looking for

  • Unable to replicate Open Directory server

    I have a Master OD server that is currently being replicated to an offsite OD. But im looking to run a dedicated Mini for the offsite, but i cannot get the new mini to replicate. The slapconf log says the credentials are invalid. and exits with error

  • Iphoto wouldn't open in yosemite! asking me for permission repair.

    I'm running Yosemite on an Note Book Pro 17" , 2.66 GHz Intel Core 2 Duo, 8 GB 1067 MHz DDR3 and updated iphoto to 9.6. When trying to open it, it tells me that the permissions for the library are not valid and that I have to repair permissions. I re

  • Installing 10.2.0.5 client on top of 10.2.0.3

    Hi, I am trying to install the Oracle client on a Windows 7 machine (64 bit). I did some looking and found info which recommended installing the Oracle Database 10g Client Release 2 (10.2.0.3), followed by the 10.2.0.5 patch set. I downloaded and ins

  • DMS for iOS 64 bit arm64

    Trying to develop a mobile app on iOS, and enable it to sync with backend oracle 11g database via the database mobile server. However the iOS SDK library provided by Oracle (libosync.a) was complied for armv7 - the 32bit iOS system architecture. But

  • After reinstalling Photoshop PS6 I cannot any longer save smart collections in Bridge

    Hi, after reinstalling Photoshop PS6 I cannot any longer save smart collections in Bridge. I create a smart collection by entering criteria, but when I click on SAVE, it is not saved. In my old installation (before I had to install a new hard disk),