Need help with console program?

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();
        }
    }
}









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..
ModuleNotFoundError: No module named 'programo'
ModuleNotFoundError: No module named 'programy'
Need Help on JMS - JMS
java program7
Need help with nested queries
Need help in java programming
need help with program
need help please
Need Help in Java programming
need help to create applet
seriously need help....
need help with program
Need help on JAVA JSP
Need some help urgently
need help - Swing AWT
hello there i need help
Need Help With This Scenario
Need Help With This Scenario
Need Help - Java Beginners
i need a help in this please
Need Help on the script
need help - Java Beginners
Need help - Java Beginners
Need help with my project
need help...................please
need help with a program - Java Beginners
I have need to help
ModuleNotFoundError: No module named 'program1'
need help with a program - Java Beginners
need someone to do/help with code
Need urgent help with C++ errors!
Need help on mySQL 5 - SQL
PLZ Need some help JAVA...HELP !!
i need help - Development process
Need help in constructing bubble sort
Java Programming Need Help ASAP
i need help - Development process
i need help plz .... Quickly
Netbeans Question need help desperately!!
i need help to solve this problem

Ads