java - How to solve "Cannot resolve symbol" in IntelliJ IDEA? -


i learn algorithms, 4th edition intellij idea, however, encouted issue idea told me "cannot resolve symbol 'stdin' , 'stdout'".

pic: [cannot resolve symbol "stdin"](http: //i.imgur.com/zrd6o53.jpg)

my project structure correct , set stdlib.jar 1 of dependencies, there stdin , stdout. clicked "invaildate caches , restart" issue remains.

http://i.imgur.com/nvyowp8.jpg

http://i.imgur.com/gvewjtn.jpg

you may learn details of stdlib.jar here , average.java

public class average {      // class should not instantiated    private average() { }      /**      * reads in sequence of real numbers standard input , prints      * out average standard output.      */     public static void main(string[] args) {          int count = 0;       // number input values         double sum = 0.0;    // sum of input values          // read data , compute statistics         while (!stdin.isempty()) {             double value = stdin.readdouble();             sum += value;             count++;         }          // compute average         double average = sum / count;          // print results         stdout.println("average " + average);     } } 

p.s.: question not solve issues.

i see when not define variable , try use it, here:

public class animal {     private string name;      public string getname() {         return name;         address = new string(); // here see error     }      public void setname(string name) {         this.name = name;     } } 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -