Create a program that when given a four word sentence as CMD arguments, it prints it backwards.
E.g the sentence “How are you Today”, will be printed as “Today you are How”.
Sample run 1: Sample run 2:
java lab02_task01 how are you today java lab02_task01 we are going home
Output: today you are how Output: home going are we
1
Expert's answer
2021-09-15T11:41:55-0400
public class Main {
public static void main(String[] args) {
if (args.length > 0) {
for (int i = args.length - 1; i >= 0; i--) {
System.out.print(args[i] + " ");
}
}
}
}
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment