I'm working on a school assignment, and I've hit a wall in my code where I can't get my Int and double from my main method to my nonstatic method. in the one instance where I did manage to get no errors and everything looked correct, nothing happened and it was as if I had done nothing at all.
My code:
```
import java.util.Scanner;
public class VendingChange {
/**
* Vending extra credit
* by:
*
* Requirements:
* 1) The program must use Scanner in order to grab what the user types in
* 2) You must have at least 2 methods, one static, and one non-static
* 3) The main method should be used to ask the user for the price of the item and the non-static method should be used to calculate the amount of change and to print the results.
* 4) Make sure you have a javadoc and single line comments throughout the program
*
*/
public static void main (String[] args){
Scanner check = new Scanner(System.in);// import of the scanner
char cents = '\u00a2';//Unicode of cent symbol
System.out.print("Your item costs (25" + cents + " minimum, Increments of 5" + cents + "): ");
Double price = check.nextDouble(); //price of the item
System.out.println("You paid (whole dollars only): ");
int paid = check.nextInt(); //amount paid
VendingChange newVend = new VendingChange();//creates a copy of the class
newVend.Secondary();// calls the nonstatic
}
public static void trianary(){
main(null);
}
public void Secondary () {
System.out.println("your change is " );
}
}
```
I can't figure out how I'm supposed to connect my methods.