repl.it
@AZRIELGIESWEIN/

First Object -1

Java

No description

fork
loading
Files
  • Main.java
  • jdt.ls-java-project
  • SomeClassName.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import java.util.Scanner;
import java.util.Random;
class Main {
  public static void main(String[] args) {
    System.out.println("Welcome to Halo 1966");
  Random rand = new Random();
  Scanner Cortana = new Scanner(System.in);
  //Cortana.setSpartanNum(rand.nextInt(999));
  
  System.out.println("   ");
  System.out.println("   ");
  System.out.println("Type in your name and press [Enter] to play");
  String name = Cortana.nextLine();
  System.out.println("Name: " + name);
  System.out.println("Spartan ID: " + (rand.nextInt(999))/*spartannum*/);
  }
}

?