The last item is supposed to be passed as an ENUM value and it doesn't like it.
The constructor I am passing to is like this:
The ENUM is like this:
I have looked online and tried the formatting examples but none are working. How do I get the ENUM value SUV to pass to my constructor?
Niccola LeBaron wrote:Telling me AutoType can't be resolved.
You've probably got more than one package in your project. If so, you need to import the AutoType enum into the source file using the import statement. Read this tutorial on packages and come back if anything is not clear.
I have seen examples without the period. What is the period doing? When would a period be correct and why would examples show a space?
The period serves to reference a field that is part of some class or instance, or (alternatively) to separate class name from package specification. In your case, the SUV constant is part of the AutoType class (enum is just a little bit special class in Java - find out and read Java tutorials on enums if you're not sure why SUV is a constant or how is it part of the AutoType class).
If you use enum in a switch statement, you don't have to specify the enum class in individual case statements inside the switch - the class is unambiguously determined by the type of the expression in the switch statement.
There is a way to avoid the need to specify class name in other statements too (the import static statement). However, I'd suggest you to ignore it now and revisit it once you get better grasp of the more basic Java concepts.
Does it have something to do with the method being in the same class or being in an instanceof?
Yes. Statements in a method of a class do not have to qualify the same class or its super classes with name - it is inferred automatically from the context.
The instanceof is somewhat connected to this concept as it tests whether an object is an instance of a class, an instance of a subclass, or an instance of a class that implements a particular interface.