Huh? This is JavaScript forum. You should go to this forum instead.
To answer your question, it said that you to create 2 String variables. Assign the value "COMPUTER PROGRAMMING" to the first one, and then iterate through a loop using the first variable length in reverse order. Inside the loop, append each character to the second string using charAt() method. Nothing saying about display the result, but you should be able to by using System.out.print() or System.out.println() method to do so.
Taywin
Posting Maven
2,633 posts since Apr 2010
Reputation Points: 275
Solved Threads: 375
Skill Endorsements: 17
Sorry Troy, the requirement said that the OP needs to use charAt() method to solve the problem. Besides, there is no reverse() or join() method for String class in Java (not JavaScript).
/*
i.e in Java
String title1 = "COMPUTER PROGRAMMING";
String title2 = ""; // if not use StringBuilder class
for (...) { // do the loop in reverse
// rebuild the string here one char by one char
}
*/
Taywin
Posting Maven
2,633 posts since Apr 2010
Reputation Points: 275
Solved Threads: 375
Skill Endorsements: 17
No no Troy, many people who are new to programming often times are confused that Java is JavaScript and vice versa. This requirement is more on programming concept which is DIY. To learn some logics, you may need to learn how a built-in function/method works by implementing it yourself.
Taywin
Posting Maven
2,633 posts since Apr 2010
Reputation Points: 275
Solved Threads: 375
Skill Endorsements: 17