Hello metalx66. Welcome to the Java Programming Forums.
This all looks correct to me. I have used
System.out.println(); to see what values are being generated.
To make sure the randomEndNumber is working correctly, try reducing the range.
import java.util.Random;
import java.util.Scanner;
public class AS1Q2 {
public static void main(String[] args) {
Scanner scan = new Scanner (System.in);
String firstName;
// Using print line will allow the user to enter their name below the Console txt showing "Enter Your Name: "
System.out.println ("Enter Your First Name: ");
firstName = scan.nextLine();
// Generates first value for Letter conversion //
Random random = new Random();
int nameGen1;
nameGen1= random.nextInt(firstName.length());
System.out.println (nameGen1);
int nameGen2;
nameGen2 = random.nextInt(firstName.length());
System.out.println (nameGen2);
int nameGen3;
nameGen3 = random.nextInt(firstName.length());
System.out.println (nameGen3);
// Generates second value for Letter conversion - not required, left in as apart of Troubleshooting ---//
//Random genThree = new Random();
// Generates third value for Letter conversion - not required, left in as apart of Troubleshooting ---//
//Random genFour = new Random();
//--------------------------Generates Last Three Numbers of Rego Between 100 and 999 -----------------------------------//
Random generator = new Random();
int randomEndNumber;
randomEndNumber = generator.nextInt(900) + 100 - 1;
System.out.println (randomEndNumber);
//----Output---//
System.out.println("Your Registration Number is: "+firstName.toUpperCase().charAt(nameGen1)+""+firstName.toUpperCase().charAt(nameGen2)+""+firstName.toUpperCase().charAt(nameGen3)+" "+randomEndNumber);
}
}