There are several control structures in
java and all of them can be used to solve this problem.
You should write out what you need to do in psuedocode to determine which structure is best for you. I have posted a link to a control structure tutorial.
An example of pseudocode:
Student class
create student object
initialize name, gpa, and major of student
print students information
Control structure tutorial:
http://java-programming.suite101.com/article.cfm/introduction_to_java_control_structures
-Hunter