Is this a correct way to utilize classes and methods in JAVA? I am currently learning JAVA. I barely have any coding experience. I wrote a program which asks a user for a sentence. It then swaps the words of the sentence (first with last, second with second to last, etc.). Program will then output the new sentence. 

I know that this is not the most optimal way this task could be solved so please ignore that. 
My question is: "Do I use classes and methods correctly? If not, how would I adjust them in this code? In particular, I feel my main method looks weird (the way parameters are added to the methods)."

The code compiles and works as intended. My question is more in regards to style.

I add the code, in 2 classes

main class:

package com.test;

public class ND2_Task1 {

    public static void main(String[] args) {

        ND2_Task1_Core run = new ND2_Task1_Core();

        run.getInput(); // gets userSentence
        run.getWordCount(run.getUserSentence());
        run.checkValidity(run.getWordCount());
        run.toArray(run.getUserSentence()); // transforms String into an array
        run.reverseArray(run.getSeperatedSentence());
        run.showResult(run.getSeperatedSentence());

    }

}



2nd. class:

package com.test;

import java.util.Arrays;
import java.util.Scanner;

public class ND2_Task1_Core {

    private static String userSentence;
    private static int wordCount;
    private static String[] seperatedSentence;
    private static String[] reversedSentence;

    public void getInput() {
        System.out.println(
                "Please enter a sentence.\nFirst word will be swapped with the last one.\nSecond word will be swapped with second to last\netc.");
        setUserSentence(new Scanner(System.in).nextLine());

    }

    public void getWordCount(String userSentence) {
        wordCount = 1;
        for (int i = 0; i &lt; userSentence.length(); i++) {
            if (userSentence.charAt(i) == ' ') {
                wordCount++;
            }
        }

    }

    public void checkValidity(int wordCount) {
        if (wordCount &lt; 2) {
            System.out.println(
                    "You have entered an insufficient number of words. Enter at least 2 words for program to swap them");
            System.out.println("Exiting now");
            System.exit(0);
        }

    }

    public void toArray(String userSentence) {
        setSeperatedSentence(userSentence.split(" "));

    }

    public void reverseArray(String[] seperatedSentence) {
        reversedSentence = new String[seperatedSentence.length];

        reversedSentence = seperatedSentence;

        for (int i = 0; i &lt; reversedSentence.length / 2; i++) {
            String temp = reversedSentence[i];
            reversedSentence[i] = reversedSentence[reversedSentence.length - i - 1];
            reversedSentence[reversedSentence.length - 1 - i] = temp;
        }

    }

    public void showResult(String[] reversedSentence) {
        System.out.println(Arrays.toString(reversedSentence));

    }

    public String getUserSentence() {
        return userSentence;
    }

    public void setUserSentence(String userSentence) {
        ND2_Task1_Core.userSentence = userSentence;
    }

    public String[] getSeperatedSentence() {
        return seperatedSentence;
    }

    public void setSeperatedSentence(String[] seperatedSentence) {
        ND2_Task1_Core.seperatedSentence = seperatedSentence;
    }

    public int getWordCount() {
        return wordCount;
    }

    public void setWordCount(int wordCount) {
        ND2_Task1_Core.wordCount = wordCount;
    }

}
```
You seem to be under the impression that efficient code and good design are two separate things.  A good design will help you write efficient code.  

In this particular case, you need to learn about separation of concern.  Specifically what is the user concerned about and what should be handled by the class?

The user basically just wants the words in the supplied string swapped.  Everything else should be handled inside the class.

In the class itself, you don't really need all those properties and helper methods.  The main purpose of the code can easily be summed in one function.  I would suggest a utility class(StringUtils?) with a public static function to swap the words and return a string.

The solution could look like this:

Main.java

import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    String sentence;
    System.out.println(
        "Please enter a sentence.\nFirst word will be swapped with the last one.\nSecond word will be swapped with second to last\netc.");
    try (Scanner sc = new Scanner(System.in)) {
      sentence = sc.nextLine(); 
    }   
    String swapped = StringUtils.swapWords(sentence);
    System.out.println(swapped);
  }
}


StringUtils.java

public class StringUtils {

  public static String swapWords(String input) {
    String[] usersWords = input.split(" ");
    if(usersWords.length &lt; 2){
      inputError();
    }
    String[] words = new String[usersWords.length];
    int mid = (words.length / 2) + 1;
    for (int front = 0, back = words.length - 1; front &lt; mid; ++front, --back) {
      words[front] = usersWords[back];
      words[back] = usersWords[front];
    }
    return String.join(" ", words);
  }

  private static void inputError(){
            System.out.println(
                    "You have entered an insufficient number of words. Enter at least 2 words for program to swap them");
            System.out.println("Exiting now");
            System.exit(0);   
  }
}