Write a program that converts the Java sourcecode from the next-line brace style to the end-of-line brace style. For example,the following Java source in (a) uses the next-line brace style. Your...

Write a program that converts the Java sourcecode from the next-line brace style to the end-of-line brace style. For example,the following Java source in (a) uses the next-line brace style. Your programconverts it to the end-of-line brace style in (b).

Your program can be invoked from the command line with the Java source-codefile as the argument. It converts the Java source code to a new format. For example,the following command converts the Java source-code file Test.java tothe end-of-line brace style.java Exercise12_12 Test.java  public class Test

public class Test {

public static void main(String[] args) {

{

public static void main(String[] args)

{

|I Some statements

I/ Some statements

}

}

}

(a) Next-line brace style

(b) End-of-line brace style




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here