I know this is a repeated question but I don't really understand how to call upon the functions or the utility of all the privates etc... So what I'm trying to do is "build a bear" where u pick the size and colour in a different class while the main class calls it, like this:
Size
import java.util.Scanner;
public class BABSize
{
public static String size()
{
Scanner input = new Scanner(System.in);
System.out.println("Would you like a small, medium or big bear?");
String size = input.nextLine();
input.close();
return size;
}
}
Colour
import java.util.Scanner;
public class BABColour
{
public static String Colour()
{
Scanner input = new Scanner(System.in);
System.out.println("What colour would u like your bear?");
String colour = input.nextLine();
input.close();
return colour;
}
}
Main
public class MainFunction
{
public static void main(String[] args)
{
BABColour c = new Colourr();
BABSize g = new Size();
System.out.println("Your " + g + "," + c + " bear will be ready in a moment:)");
}
}