Hi, i’ve been working a simple code and it’s giving me an error that i don’t understand why, thanks for helping

Main class: the only problem I have is when I call function

import java.util.Scanner;
public class FindSmallestInt {
public static void main(String [] args) {
Scanner scan = new Scanner(System.in);
System.out.print("Enter a value for x: ");   // take user input
int x = scan.nextInt();
System.out.print("Enter a value for y:");    // take user input
int y = scan.nextInt();
System.out.println("Enter a value for z:");  // take user input
int z = scan.nextInt();
int smallest = *FindSmallestInteger*(x, y, z); // call function but there is error

System.out.print("The smallest integer value is: " + smallest);


my function: this function find the smallest of three numbers

public int FindSmallestInteger(int a, int b, int c) {
    if (a < b && a < c) {
        return a;
    else if (b < a && b < c) {
        return b;
    else {
        return c;