java
please java help
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
10
Answer(2)![blurred-text]()
![]()
![blurred-text]()
![]()
Purchase the answer to view it

NOT RATED
- java.java_.zip
Purchase the answer to view it

NOT RATED
- linecounter.txt
Bids(0)
other Questions(10)
- For Sir_Excellence/$175-Unit 1: Understanding the Tourism and Hospitality Industry with Work Placement Introduction To be assessed on this unit you need to undertake and SUBMIT a 2,000 word assignment, clearly following relevant instructions on content
- Economic and cost Analyses
- PHE5005 S01 Assignment 3: Final Project 3: Evidence-Based Research | Introduction to Health Services and Research
- Also Philip Morris is known as a cigarette smoking cigarettes " invest " in Wholesale Newport Cigarettes
- System Implementation
- brnd inventory
- PSY 285 Week 1 Assignment Experimental Research
- Human Sexuality
- CIS 106 Week 3 discussion question
- interpersonal conflict