Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Niccola LeBaron

Greenhorn
+ Follow
since Apr 15, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Niccola LeBaron

Telling me AutoType can't be resolved. 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? Does it have something to do with the method being in the same class or being in an instanceof? I hope I am using the right verbiage.
10 years ago


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?
10 years ago
Thanks I figured out the code tags.

I added the getName method to shape and that fixed it. Thanks so much
10 years ago
I don't know why it doesn't like the getName() call. this is my first post here so if I am missing something that I should have included please just let me know.



There is a super class called shapes and then two under that. TwoDimensionalShape and ThreeDimensionalShape
Under TwoDimensionalShape there are several subclasses. Circle, Square and triangle. Seems like everything is fine except the getName() call.
Here is what I have for one of the subclasses.

10 years ago