lesson 29
I just copy your code on lesson 29 about oop and error on line 8 (No enclosing instance of type activityFour is accessible. Must qualify the allocation with an enclosing instance of type activityFour (e.g. x.new A() where x is an instance of activityFour) occurs. Im using an eclipse IDE.unknown
java
2 years ago
401 B
4
Indexable
package projectFour; public class activityFour { public static void main(String[] args) { Monitor monitor1 = new Monitor(); monitor1.width = 1000; monitor1.Width(); } public class Monitor { int width; int heigth; int brightness; void changeBrightness() { } void Width() { System.out.println(width); } } }