I made basketball program using Java that runs on console I made a simple console basketball game using Java.
/*
 * Java Basketball
 * by Clint
 * 2020.07.08 | 3:59AM
 * This Java program let's the player play basketball in console.
 */
 
import java.util.Random;
import java.util.Scanner;

public class Basketball {

    static String[] shoot = {&quot;1 POINT!&quot;, &quot;2 POINTS!&quot;, &quot;3 POINTS!&quot;, &quot;MISSED!&quot;};
    static String player;
    
    public static void main(String[] args) {
        System.out.println(&quot;WELCOME TO JAVA CONSOLE BASKETBALL\n&quot; +
                &quot;how to play:\n&quot; +
                &quot;press \&quot;s\&quot; or type \&quot;shoot\&quot; to shoot the basketball.\n&quot;);
                
        while (true) {
            shootBall();
        }
    }

    public static void shootBall() {
        Random random = new Random();
        Scanner scanner = new Scanner(System.in);
        
        int shot = random.nextInt(shoot.length);
        System.out.print(&quot;SHOOT: &quot;);
        player = scanner.nextLine();
        
        switch (player) {
            case &quot;s&quot;, &quot;S&quot;, &quot;shoot&quot;, &quot;Shoot&quot;, &quot;SHOOT&quot; -&gt; System.out.println(shoot[shot] + &quot;\n&quot;);
            default -&gt; System.out.println(&quot;SHOOT THE BALL PROPERLY.\n&quot;);
        }
    }
}

ps: ik that there's while (true) in my code, but it's the thing that I know so far that keeps the programme running. I'm open for suggestions on how to improve my coding.
Descriptive variable names
You have this:
player = scanner.nextLine();

Does the input reflect a player?
I think a more descriptive name would be playerInput. That makes the switch more readable as well.
Make methods do one thing (single responsibility principle)
Your shootBall method does three things: asking for input, calculating the result, and printing the result. Ideally this would be split up:

private String getInput()
private String shootBall(String input)
private String printResult(String result)

This makes it easier to change the implementation of a responsibility and easier to read the logic of your program.
The main while loop would become
while(true) {
    String input = getInput();
    String result = shootBall(input);
    printResult(result);
}

This makes it easier for coding some exit value as well;
while (true) {
    String input = getInput();
    if (input.equals(&quot;QUIT&quot;))
      break;
    String result = shootBall(input);
    printResult(result);
} 

Or, if you don't like the while-true-break
String input;
while (!(input = getInput()).equals(&quot;QUIT&quot;)) {
    printResult(shootBall(input));
}