Write a Java program that reads two pyramid data from the user, which includes the name (string), base (float), and height (float). The program should display the volume for each pyramid in the file "pyramid.txt" using the following equation: V = (1/3) * b^2 * h.
Sample Input/output of the program is shown in the example below:
Screen Input (Input screen):
Enter the first pyramid data: Pyramid1 3.0 3.0
Pyramid1
9.0
Enter the second pyramid data: Pyramid2 6.0 2.5
Pyramid2
30.0