Hi all,
I was wondering if someone could help. First let me start by saying that this problem is for a class. I have looked through some past posts but I am not sure I am looking for the right thing.
The problem is I need to make a code that will swap the first and last characters in an array. But I have to figure out how to keep it simple so that no matter how big the array gets it will perform the same way. Here is what I have so far.
public class Lab21C {
public static void main(
String[] args) {
char[] table = {'a', 'b', 'c', 'd'};
If someone could get me going in the right direction I would really appreciate it.
Thanks