HI i am a bit new to java and I am not sure about methods. I was hoping if someone can give me an example
this is what its asking
Variable Name Variable Contents
myName = place your name here
creditsTaken = place your credits taken this semester
totalCredits = place your total amount of credits taken
GPA = place your current GPA
major = place your major
className = place the name of this class
- Call a method named myInfo PASSING the previous variables
and this is what I have I am not sure what they mean by asking "call a method named myInfo"
public static void main(String[] args) {
String myName, Major, className;
Double creditsTaken, totalCredits, GPA;
int maxValue, addNumbers;
myName = "william";
Major = "information technology";
className = "operating Systems";
creditsTaken = 9.0;
totalCredits = 70.0;
GPA = 3.1;
maxValue = 100;
addNumbers = maxValue;
System.out.println();
System.out.println("hello my name is.... " + myName);
System.out.println("my major is.... " + Major);
System.out.println("I have completed " + totalCredits + " credits so far");
System.out.println("I am taking " + creditsTaken + " credits this semester");
System.out.println("This class name is...... " + className);
System.out.println();
System.out.println(addNumbers + 1);