Final answer:
To read the last 100 numbers in a file in Java, you can use the RandomAccessFile class. First, determine the size of the file and position the file pointer accordingly. Then, read the numbers using a loop.
Step-by-step explanation:
To read the last 100 numbers in a file in Java, you can use the RandomAccessFile class. First, determine the size of the file using the length() method. Then, use the seek() method to position the file pointer at the appropriate location, which is the file size minus 400 (100 numbers * 4 bytes each, assuming integers). Finally, read the numbers using the readInt() method in a loop, until you have read all 100 numbers.