class - Trouble accessing variables from different Java classes -


i trying figure out how variable linearequation class main class. have been trying replicate results instructor's notes, hasn't been working. have seen examples close instructor did, mine still doesn't want work.

right goal simple, want declare double = 1 in linear equation class , return main class , output there.

main class

linearequation class

i see couple problems.

  1. (as mentioned @kishorekumarkorada) linearequation constructor expecting multiple arguments

    linearequation le = new linearequation(1,2,3,4,5,6);

  2. when call method need include parentheses

    system.out.print(le.geta());

  3. your geta method should refer this.a rather a

    public double geta() { this.a = 1; return this.a; }


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -