Access variable from a different class in a different package?
问题 I want to set it so igAS for each igCharacter will be limited by a variable in igMech. Here is what I have first : package igCharacters; import igMech.*; protected class igBrand { public double igAS = .77; } second: package igMech; class igLimits { double aSLimit = 2.5 } 回答1: I think you might want to use the public modifier (although it's quite hard to tell what you mean from your question). You are using default, which is package-private (i.e. not accessible from any class outside the