Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need the answer in Java format 7. (20 points) Write a few lines of code that print all of the numbers in an array
I need the answer in Java format
7. (20 points) Write a few lines of code that print all of the numbers in an array named numbers, all on one line. There should be a space, a hyphen, and another space between each pair of numbers, but not before the first number or after the last. If the array contained elements 1, 2, and 3 you would print 1 - 2 - 3. If it contained 4, 5, 6, and 7 you would print 4 - 5 -6 7. Hint: Look back at the textbook section on Fencepost Algorithms. 8. (50 points) Write a main method that makes a copy of a file, except that all numbers in the original file are replaced by the word "REDACTED" in the copy of the file. This only applies to numbers that are their own tokens, not numbers that are part of a larger token. The copy should have line breaks at the same places where the original did, but if the original had extra spaces or tabs anywhere, they may be removed. You may also add an extra space at the end of each line if doing so makes the problem easier for you. The example below will hopefully make this clearStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started