217k views
1 vote
Create a new Java program called MyInfo. Create one or more method(s) that pass the following information as parameters and prints it when the method is called. Full name Middle Initial Age Major GPA Once completed, paste code.

User Shivika
by
3.8k points

1 Answer

2 votes

Answer:

Answered below

Step-by-step explanation:

//Program in Java

class MyInfo{

public static void main (String args []){

myFullName("John", "Doe");

myAgeMajorGPA(20, "Biology", 4.3);

}

public void myFullName(String initialName, String middleName){

System.out.println(initialName);

System.out.print(middleName);

}

public void myAgeMajorGPA(int age, String major, double GPA){

System.out.println(age);

System.out.println(GPA);

System.out.print(major);

}

}

User Andrew Kandels
by
4.0k points