No, it has to be different for each instance.
It would make sense that it would get the value from the constructor, but the constructor call in the pre-written test class is written as:
...
Type: Posts; User: mjpam
No, it has to be different for each instance.
It would make sense that it would get the value from the constructor, but the constructor call in the pre-written test class is written as:
...
Is there a way to intialize the final variable with each instantiation of class without having to add an argument to the constructor?
I'm trying to as literal as I can in my interpretation of the assignment until I can get feedback from the instructor. That means that I was wondering if setting ID can be done without introducing...
First , thank you for your helpful replies.
This is actually for an assignment for an online course.
This is what I have so far:
import java.awt.*;
class Rectangle
I'm not what type of variable to use to achieve my desired result.
What I want is a variable that can be initialized differently in each instantiation of the class but cannot be reassigned another...