Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
NEED JAVA COMPUTER PROGRAMMING HELP?
Say that a text file looks like this:
x= 10
y= -45
y= 98
x= 13
x= 37
y= 36
x= -2
. . .
Each line starts with "x=" or "y=" but which of these it starts with follows no pattern. Each of these is followed by a space then a single integer. Nothing else follows the integer on a line.
Write a program that reads in this data file and computes the sum of the x values and the sum of the y values. Hint: use hasNext() and next() to read the "x=" and "y=" tokens and then use nextInt() to read the integer. You will also need the equals() method of String.
CAN SOMEONE PLEASE WRITE ME A PROGRAM
1 Answer
- godfatherofsoulLv 78 years agoFavorite Answer
This forum is for helping people, not getting your homework done for you. This is the 2nd assignment you've posted today.