public class Test(){
public List makeList(){
//some code
....
double density = mass / vol;
return mylist;
}
}
How can I refer to density even though I only returned a list? In Python, I can call self.density
I know I can create another class Pair<List, Double> but I would rather not do that due to clutter.
self.density". No you can't, not unless it's a member of the objectTest.