How to add a search/edit/delete options for the following program.

after printing the out put, i want to search for the line and i want to edit the same line then add to the output and also i want to delete the line from the command line
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
public class CustomerDetails {
public static void main(String[] args) throws IOException {
BufferedReader dataIn= new BufferedReader(new InputStreamReader(System.in));
FileWriter writer;
String name= "";
String DOB = "";
String Address = "";
String Phonenumber = " ";
File filename = new File("customerData.txt");
boolean append = true;
writer = new FileWriter(filename,append);
writer.write("\n");
try {
System.out.println("Please enter your name");
name = dataIn.readLine();
System.out.println("please enter ut DOB");
DOB = dataIn.readLine();
System.out.println("please enter ur Address");
Address = dataIn.readLine();
System.out.println("please enter ur phone number");
Phonenumber = dataIn.readLine();
writer.write("name:");
writer.write(name);
writer.write("DOB:");
writer.write(DOB);
writer.write("Address:");
writer.write(Address);
writer.write("Phone number:");
writer.write(Phonenumber);
writer.close();
catch (IOException e) {
e.printStackTrace();
System.out.println("thanks for entering  the data");
}

Well, what I'm suggesting isn't as simple as editing a few lines.
Are you familiar with using objects?
The idea is to organize your data in a way that makes sense. Since you want to keep track of multiple people at once, does it make sense to only have one variable each for name, address, etc? If you put all of the variables dealing with a person into a Person object, you can then instantiate as many people as you'd like- without worrying about keeping track of them one variable at a time.
I'd say that should be your first step. After that, we can talk about searching through them.

Similar Messages

  • How to add a Wait Step in BPM for the synchronous send step

    Hi,
    we have a scenario where in one of the step in BPM is a synchronous step which sends data to ECC system and gets the Respose .
    The Requirement is that we need to add a wait for the Synchronous step in BPM as the data sent to RFC(ECC) need to get comitted before sendng the response which requires some wait time.
    Currently we are getting the Response to PI from ECC where it was reported as the response is not correct.
    Is this possible to add wait

    > Is this possible to add wait
    No, this does not make any sense.
    The BPM waits for the response anyway.
    You could change the scenario to an asynchonous pair of messages.
    But in my opinion the error is inside the ECC, because the response from ECC is not correct.

  • How to add F1 help on a field for a screen program?

    Dear all,
    Can you suggest the method / sample code to add F1 help text for a field on a screen program.
    what is the methodology to do this!!?
    Regards,
    Vj

    Hi,
    if u maintain the doccumentation for the data element of a field(if it is from data dictionary table) which u r refering to create the screen element u don't need to write any doccumentation.otherwise follow this link
    Adding F1 help.
    rgds,
    bharat.

  • How can add own arrow to Arrowhead options in the Stroke panel?

    Where is file with arrows?

    Mac or Windows? On a Mac it's in HD/Applications/Adobe Illustrator CC or CSX/Adobe Illustrator CSX.app. Right click ont the app and Show Package Contents. Then Required/Resources/en_US/Arrowheads.ai

  • How to add custom texts in Office Templates   for  the COBRA form set up

    Hi,
    How to insert custom texts in the copied BDS form from COBRA set up. I could not edit the text. I can edit the contact numbers in the standard text and displaying after saving the document.
    I do not know how to proceed for this.
    Please share your valuable experience in this regard.
    Thank you,
    Ravi.

    Structure Ptk03 ,Ptk33 needs to be enhanced

  • How to get more then 2 Appearance options for the overall look and fell?

    How can this be possible instead of either Aqua or Gray?

    MobileDev wrote:
    "Apple’s Limited Warranty for iPhone excludes coverage for damage resulting from accident, unauthorized service and unauthorized modifications."
    Apple's iPhone Warranty is referring to hardware modifications, because it is just a hardware warranty. It explicitly denies covering software, even to the point of saying even the iPhone OS is not covered by any warranty.
    When you update the iPhone software to 1.1.1 or later you'll see this message
    "Apple has discovered that some of the unauthorized unlocking programs available on the Internet may cause irreparable damage to the iPhone's software. IF YOU HAVE MODIFIED YOUR iPHONE'S SOFTWARE, APPLYING THIS SOFTWARE UPDATE MAY RESULT IN YOUR iPHONE BECOMING PERMANENTLY INOPERABLE. Making unauthorized modifications to the software on your iPhone violates the iPhone software license agreement, and the inability to use your iPhone due to unauthorized software modifications is not covered under your iPhone's warranty."
    Jason

  • Sorting options for the "Following" section

    I follow artists when I want to remember to check them out. It would be nice if the list was sorted by something. Ideally "date added".

    Marked as new idea and edited the title slightly to make it easier to find via search. ;)
    This is a re-post of this inactive idea.

  • How to Add Meta Search Description & Keywords in Flex3

    How to add meta search data & key words for the page in flex3.
    ms

    Content is what you add to your page. The visible part your visitors can see.
    Keywords have to be added with [a META tag in the HEAD|http://www.google.com/search?q=meta%20tag%20head] of the webpage. That cannot be done in iWeb. You have to edit the published pages with a HTML Editor of your choice.
    It's debatable whether these keywords have any impact on being found by a Search Engine.
    Provide good content.

  • How to add a search engine manually to Firefox. (No, not via add ons)

    How to add a search engine manually to Firefox?
    For example, what should I do add a custom search engine? It is not available via add-ons. When I go to the search page, Firefox doesn't detect it and it doesn't prompt me or allow me to add it as a search provider. I am looking for options similar to that in Chromium browser.
    let's say for instance, if I want to add redhat bugzilla to my search providers, I can go to search settings and just add https://bugzilla.redhat.com/buglist.cgi?quicksearch=%s
    Is there any similar option available in Firefox?

    I use these;
    '''[https://addons.mozilla.org/en-US/firefox/addon/add-to-search-bar/ Add to Search Bar]''' {web link}
    Make any pages' search functionality available in the Search Bar
    '''[https://addons.mozilla.org/en-US/firefox/addon/context-search/ Context Search]''' {web link}
    Expands the context menu's 'Search for' item into a list of
    installed search engines, allowing you to choose the engine
    you want to use for each search.
    '''[https://addons.mozilla.org/en-US/firefox/addon/searchthissite/ SearchThisSite]''' {web link}
    Allows you to search the website currently viewed with
    the website's internal search engine (and not the default
    FF search engine or an external engine)

  • How to set auto delete option for old messages

    Hi All,
    Can any one help me on how to set auto delete option for mails older than 15 days from my Z10.
    James Kurian

    There is no such option in BB 10.
    However, you can achieve a similar result by setting your email sync timeframe to 14 days (the closest option).
    If you are using an ActiveSync account (such as Hotmail, Outlook.com), go to Settings > Accounts > select the account. Tap advanced at the bottom of the screen. Scroll to the very bottom, tap Sync Timeframe and set to 14 days.
    If you are using an IMAP account (such as Gmail or GMX), you will have to delete, then re-add your account.  The Sync Time frame is only avaialble during setup for these accounts.  When adding, tap advanced at the bottom of the screen and set the Sync Timeframe.
    Hope this helps.

  • How to add a search help for a field in Screen Personas?

       I just started learning to use a Screen Personas, and I want to know how to add a search help for a field.
       I found a property in the help document named "IsLookupSupported". Is it the key?  But I saw it was gray in the field I created, and its value is "false". I could not change it.

    Hi, Tamas,
    I found the reason. The function Z_WEBRFC_READ_DATA_SH had a string concatenation error.
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    The correct code is like:
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},{"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    Another question is, I can't get any words in Chinese from WebRFC. It returns error when I try it. How can I configure it?
    Xin

  • How to add a search help to a field  Bank Type in Transaction FK02

    Dear All,
         How to add a search help to a field  Bank Type in Transaction FK02.
         Is there any possibilty of using  exit or searc help or domain to solve this problem.
            Thanks in Advance..
    Thanks,
    Lakhsmi.

    Hi, Tamas,
    I found the reason. The function Z_WEBRFC_READ_DATA_SH had a string concatenation error.
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    The correct code is like:
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},{"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    Another question is, I can't get any words in Chinese from WebRFC. It returns error when I try it. How can I configure it?
    Xin

  • How to add a search engine  like What do you love of Google ?

    how to add a search engine  like What do you love of Google ? I use Glims but it doesn't work or I don't know how to go about it
    Thanks

    You can also add any search engine not already listed in Glims by using the method described here:
    http://www.machangout.com/tutorials/addsearchengine
    Just enter the name you give the search engine in the name field, and the URL for it in the Query URL field.

  • How to add new item in more options dialog box

    Hi all,
    Can anyone tell me how to add new item in more options dialog box(site actions -> more options). I want to add new item there to the new page layout which I created but I didn't find any way to do it. can anyone assist me for this.

    Good point, in order to add a Page into that area, you will need to define a Custom Action. You can learn more about creating Custom Actions here:
    http://msdn.microsoft.com/en-us/library/hh500259(v=office.14).aspx
    As an example, Microsoft uses the following Custom Action to add the "Publishing Page" to that Create Silverlight control when enabling the Publishing features:
    <CustomAction
    Id="CreatePublishingPage"
    GroupId="WebPages"
    Location="Microsoft.SharePoint.Create"
    Sequence="100"
    Title="$Resources:cmscore,Create_WebPages_PublishedPage;"
    Description="$Resources:cmscore,Create_WebPages_PublishedPage_Description;"
    ImageUrl="/_layouts/images/ltpp.png">
    <UrlAction Url="_Layouts/CreatePage.aspx" />
    </CustomAction>
    Dimitri Ayrapetov (MCSE: SharePoint)

  • How to disable delete option in the receipt work bench thorugh formpersonal

    Hi Team,
    Please let me know, how to disable delete option in the receipt work bench through form personalization

    Hi.
    Condition
    Trigger Event: WHEN-NEW-ITEM-INSTANCE
    Trigger Object: RGW_FOLDER.M_PAYMENT_METHOD_DSP
    Actions
    Type: Property
    Object Type: Block
    Target Object: RGW_FOLDER
    Property Name: DELETE_ALLOWED
    Value: FALSE
    Note: The button will remain visible and if the user presses it, the system will ask if he/she want to delete the receipt. However, if the OK button is pressed the receipt will not be deleted and a message will be shown ("You cannot cannot delete this record")
    Hope this helps.
    Octavio

Maybe you are looking for

  • How to configure mail on mac mini server?

    I have a new Mac Mini Server ver 2.0.23 I have web access and can see my server from the web going to my site but the stopping block is email services. I have one ip for www and one for mail.mydomain.com and I have all of the firewall ports open (I t

  • OPA and configuration folder rename

    Hi All, As we all know there is a configuration folder present in WEB-INF/CLASSES I wanted to rename this configuration folder to configuration_mm for this i edited application.properties file however now i need two folders one with configuration_mm

  • Error when register Url Service Sample provider

    Hello, I followed the 'URL Services Installation Instructions' described in portalstudio in order to set up URL services in my portal environment. I did succeed in invoking provider test page (http://<myserver>:<myport>/servlets/urlsample), but I'm n

  • Slow typing and sluggish

    In the last few days my imac has started to act funny. When I type fast it takes a while for the type to catch up to me. Very frustrating. Does anyone know what is going on? Thank you. PS I put this question in the wrong thread first.

  • ITunes Windows too small

    Just a comment. This does not affect the operation of iTunes but I just wanted to point this out. Your panes such as the New Releases, Just For You, Exclusives and Staff Favorites are slightly too small. Since I can't adjust the font size, the names