Prompting for five test scores and printing the average I am not sure how to properly make this readable. I have been trying to find examples online but I cannot find any that are specific to this simple program.

import java.util.Scanner;

public class KifahUnit3 {

    public static void main(String[] args) {

        Scanner stdIn = new Scanner(System.in);
        String first;  //first name
        String last;  //last name
        String full;  //full name
        Boolean nameMatch = false;
        int score1;
        int score2;
        int score3;
        int score4;
        int score5;
        int totalScore;
        int x;
        double scoreAverage;
        System.out.print("Please enter your first name: ");
        first = stdIn.next();
        System.out.print("Please enter your last name: ");
        last = stdIn.next();
        System.out.println(first + " " + last);
        nameMatch = first.equals(last);
        if (nameMatch == true) {
            System.out.println(
                    "Hello, " + first + " " + last + " "
                    + "your first and last name are the same.");
        } else {
            System.out.println(
                    "Hello, " + first + " " + last + " "
                    + "your first and last name are different.");
            full = first + last;
            System.out.println("The length of your first name is: " + first.length());
            System.out.println("The length of your full name is: " + full.length());
            System.out.println("Your initials are " + first.charAt(0) + last.charAt(0));

            System.out.println("Please enter your test scores");
            System.out.print("Score 1= ");
            score1 = stdIn.nextInt();
            System.out.print("Score 2= ");
            score2 = stdIn.nextInt();
            System.out.print("Score 3= ");
            score3 = stdIn.nextInt();
            System.out.print("Score 4= ");
            score4 = stdIn.nextInt();
            System.out.print("Score 5= ");
            score5 = stdIn.nextInt();
            scoreAverage = (score1 + score2 + score3 + score4 + score5) / 5;
            System.out.println(
                    "Score 1= " + score1 + "; " + "Score 2= " + score2 + "; " + "Score 3= "
                    + score3 + ";  " + "Score 4= " + score4 + "; " + "Score 5= " + score5);
            totalScore = score1 + score2 + score3 + score4 + score5;
            x = 10;
            System.out.println("Total= " + totalScore);
            System.out.println("Average: " + (scoreAverage + x));
            System.out.println("Ooops! Made a mistake. Your average is:  " + scoreAverage);

        }
    } // end main
} // end class KifahUnit3
Firstly - Java Code Convention
Read the Java code convention, see this cheatsheet
The Java Code convention has a more detailed description -
Why use code conventions (From the link) -

Code conventions are important to programmers for a number of reasons:

80% of the lifetime cost of a piece of software goes to maintenance.
Hardly any software is maintained for its whole life by the original
author.
Code conventions improve the readability of the software,
allowing engineers to understand new code more quickly and thoroughly.



Secondly - Refactoring
Start by using arrays - this will really reduce the amount of code you wrote. For example:
// Declare this constant at the top of the class 
private static final int NUMBER_OF_SCORES = 5;

int[] score = new int[NUMBER_OF_SCORES];

System.out.println(&quot;Please enter your test scores&quot;);

// Read all Scores
for (int i = 0; i &lt; NUMBER_OF_SCORES; i++) {
  score[i] = stdIn.nextInt();
}

With arrays, you can also easily calculate the total score and output each score -
// Total Score
int totalScore = 0;
for (int i = 0; i &lt; NUMBER_OF_SCORES; i++) {
  totalScore += score[i];
}

// Output All the scores
for (int i = 0; i &lt; NUMBER_OF_SCORES; i++) {
  System.out.print(&quot;score &quot; + i + &quot; = &quot; + score[i]);
}

You can also introduce a Person class - example. (Take note of the getInitials function)
public class Person {

    private final String name;
    private final String surname;

    public Person(String name, String surname) {
        this.name = name;
        this.surname = surname;
    }

    public String getName() {
        return name;
    }

    public String getSurname() {
        return surname;
    }

    public String getInitials() {
        return &quot;&quot; + name.charAt(0) + surname.charAt(0));
    }
}

With the introduction of a Person class, the main function can transform into the for example. (Also splitting up the main function into smaller parts)
public static final int NUMBER_OF_SCORES = 5;

public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    System.out.print(&quot;Please enter your first name: &quot;);
    // Read First Name
    String firstName = stdIn.next();
    System.out.print(&quot;Please enter your last name: &quot;);
    // Read Last Name
    String lastName = stdIn.next();
    System.out.println(&quot;Hello &quot; + firstName + &quot; &quot; + lastName);
    if (firstName.equals(lastName)) {
        System.out.println(&quot;Your first and last name are the same.&quot;);
    } else {
        // Now you know you have a valid person.
        Person person = new Person(firstName, lastName);
        System.out.println(&quot;Your first and last name are different.&quot;);
        processName(person);
        readAndProcessScores();
    }
}

private static void processName(Person person) {
    String full = person.getName() + person.getSurname();
    System.out.println(&quot;The length of your first name is: &quot; + person.getName().length());
    System.out.println(&quot;The length of your full name is: &quot; + full.length());
    System.out.println(&quot;Your initials are &quot; + person.getInitials());
}

public static void readAndProcessScores() {
    Scanner stdIn = new Scanner(System.in);

    int[] score = new int[NUMBER_OF_SCORES];
    System.out.println(&quot;Please enter your test scores&quot;);
    // Read all Scores
    for (int i = 0; i &lt; NUMBER_OF_SCORES; i++) {
        System.out.print(&quot;Score &quot; + i + &quot; = &quot;);
        score[i] = stdIn.nextInt();
        System.out.println();
    }

    // Output All the scores
    for (int i = 0; i &lt; NUMBER_OF_SCORES; i++) {
        System.out.print(&quot;score &quot; + i + &quot; = &quot; +score[i] + &quot; &quot;);
    }

    // Total Score
    int totalScore = 0;
    for (int i = 0; i &lt; NUMBER_OF_SCORES; i++) {
        totalScore += score[i];
    }

    double scoreAverage = (((double) totalScore) / NUMBER_OF_SCORES);
    System.out.println(&quot;Total = &quot; + totalScore);
    System.out.println(&quot;Your average is:  &quot; + scoreAverage);
}

This code itself can be refactored even more, but this I leave to you :)
Try doing the following -

Introduce one more class.

Extract the calculate total score into its own function. Use this declaration:
  public static double calculateAverage(int[] scores)


Add some comments to the methods :)



General tips

Always use good descriptive variable names.
Declare variables as needed (Close to where they are used).

Hope this helps!