java help
i need help with java
this is the question
Complete the code to counts the number of lines input by a user until the user enters the string ENDOFDATA (must be uppercase letters, no spaces) on a line by itself. Make sure you display the number of lines found. Use the nextLine() method of Scanner class to read entire lines of data. (Hint, this is like counting the number of integers entered, but reading Strings and using String comparison to check for equality).
String SENTINEL = "ENDOFDATA";
Scanner keyboard = new Scanner(System.in);
System.out.println( "Enter lines of data or " + SENTINEL + " to quit" );
11 years ago 5
Answer(0)
Bids(0)
other Questions(10)
- Seeds of plants consist of a plant embryo (baby plant) and stored nutrients from the parent plant such as oils, starch and proteins. One serving of almonds, about 28 seeds, contains 16 grams of fat, 5 grams of carbohydrate and 6 grams of protein. Discuss
- Help with Victimology
- ARTIFACTS AND SUMMARIES
- case analysis
- AJS 512 Week 3 Individual Assignment Leading Group Challenges Paper
- SPSS Assignment for MathematicsExpert Only
- Submit Assignment: Piecing Together a Patchwork Quilt of Services
- HRM 300 Week 4 Human Resource Management Presentation Outline
- power point
- PSY 425 Week 5 Individual Assignment Article Review