Need help with console program?

Ads
 

Need help with console program?

Write a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed).

thanks in advance.

View Answers

July 12, 2012 at 10:44 AM

Here is an example that repeatedly prompts the user to enter data until they type 'done' in any case.

import java.io.*;

class Input 
{
    public static void main(String[] args) throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        System.out.print("Enter: ");
        String str=br.readLine();
        while(!str.equalsIgnoreCase("done")){
            System.out.print("Enter: ");
            str=br.readLine();
        }
    }
}

Ads









Related Tutorials/Questions & Answers:
Need help with console program?
Need help writing a console program
Advertisements
Need in desperate help in writing a console program
Need in desperate help in writing a console program
Need in desperate help in writing a console program
Need help
Need help
Need help
Need help with this!
Friends need a help on ruby..
Need help with nested queries
need help with program
need help please
Need Help in Java programming
need help to create applet
need help with program
Need help on JAVA JSP
Need some help urgently
hello there i need help
Need Help With This Scenario
Need Help With This Scenario
i need a help in this please
Need Help on the script
Need help with my project
need help...................please
I have need to help
java program7
need someone to do/help with code
Need urgent help with C++ errors!
Need help in constructing bubble sort
PLZ Need some help JAVA...HELP !!

Ads