Question: trying to convert a entered number into quarters, nickels, dimes, and pennies. Having a few problems: 

```
    public class Coins {
public static void main(String[] args){

private int quarters, dimes, nickels, pennies;

public void CoinsToChange(TotalCoins){
    quarters = (int)(TotalCoins/25);
    TotalCoins %= 25;
    dimes = (int)(TotalCoins/10);
    TotalCoins %= 10;
    nickels = (int)(TotalCoins/5);
    TotalCoins %= 5;
    pennies = (int)(TotalCoins/1);
    TotalCoins %= 1;

    System.out.println("Quarters = " + quarters + "\nDimes = " + dimes + "\nNickels = " + nickels + "\nPennies = " + pennies);
    }
}
    }

```

and this is my tester class: (im having problems calling the CoinsTotChange method.)

```
     import java.util.Scanner;

    public class CoinsTester {
    Coins money = new Coins();
    money.CoinsToChange(changeMoney);
    Scanner kybd = new Scanner(System.in);
    int changeMoney = kybd.nextInt();

```

}

Answer: 
There are lots of syntax issues but your overall computations are correct. Try something like this:

```
public class Coins {
    public static void main(String[] args) {
        Scanner kybd = new Scanner(System.in);
        int totalPennies = kybd.nextInt();
        printMoneyAsChange(totalPennies);
    }

    public static void printMoneyAsChange(int pennies) {
        int quarters = pennies / 25;
        pennies %= 25;

        int dimes = pennies / 10;
        pennies %= 10;

        int nickels = pennies / 5;
        pennies %= 5;

        System.out.println(String.format("Quarters = %d\nDimes = %d\nNickels = %d\nPennies = %d", quarters, dimes, nickels, pennies));
    }
}

```
As far as I see there is whole bunch of problems with provided code. 

In your first code sample you introduce function declaration and private fields within 

> 
> public static void main(String[] args){ }
> 
> 
> 

, so your class will not compile and hence you'll be unable to use it from some other class 

Then, you are using variable before declaring it as @Tank suggested in his answer. 

It's also considered to be a good practice to stick with generally accepted naming conventions and formatting.