Error: Cannot find symbol (Coordinates)
<p>Here's the new coding that I re-did:</p>

<p>ThreeDPoint.java</p>

<pre><code>public class ThreeDPoint{

private double x, y, z;

public threeDPoint(){
    coordX=0;
    coordY=0;
    coordZ=0;
}

public threeDPoint(double x, double y, double z){
    coordX = x;
    coordY = y;
    coordZ = z;
}

public double getCoord(double x, double y, double z){
    return coordX;
    return coordY;
    return coordZ;
}
</code></pre>

<p>}</p>

<p>Main.java</p>

<pre><code>import java.util.Scanner;
</code></pre>

<p>public class Main{</p>

<pre><code>      double coordX, coordY, coordZ;

public static void main(String[] args){

    threeDPoint myThreeDPoint=new threeDPoint();

    Scanner sc=new Scanner(System.in);
    String coordX, coordY, coordZ;

    System.out.println("Input Coordinate X");
    myThreeDPoint.coordX(sc.nextDouble());

    System.out.println("Input Coordinate Y");
    myThreeDPoint.coordY(sc.nextDouble());

    System.out.println("Input Coordinate Z");
    myThreeDPoint.coordZ(sc.nextDouble());


}
</code></pre>

<p>}</p>

<p>It gave me these errors:
Build Output:
<strong>C:\Users\BurneySoo\Documents\Main.java:8: error: cannot find symbol
        threeDPoint myThreeDPoint=new threeDPoint();
        ^
  symbol:   class threeDPoint
  location: class Main
C:\Users\BurneySoo\Documents\Main.java:8: error: cannot find symbol
        threeDPoint myThreeDPoint=new threeDPoint();
                                     ^
  symbol:   class threeDPoint
  location: class Main
2 errors</strong></p>

<p>General Output:
<strong>Error: Could not find or load main class Main</strong></p>

<p>What am I doing wrong?</p>

<hr>

<p>Thanks so very much for the codes Gagandeep. Somehow I tried them but it gave out more errors than what I had before.</p>

<p>C:\Users\BurneySoo\Documents\ThreeDPoint.java:5: error: invalid method declaration; return type required</p>

<pre><code>public threeDPoint(){
       ^
</code></pre>

<p>C:\Users\BurneySoo\Documents\ThreeDPoint.java:11: error: invalid method declaration; return type required</p>

<pre><code>public threeDPoint(double x, double y, double z){
       ^
</code></pre>

<p>C:\Users\BurneySoo\Documents\Main.java:14: error: cannot find symbol</p>

<pre><code>myTreeDPoint.coordX(sc.nextLine());
^
</code></pre>

<p>symbol:   variable myTreeDPoint
  location: class Main</p>

<p>C:\Users\BurneySoo\Documents\Main.java:17: error: cannot find symbol</p>

<pre><code>myTreeDPoint.coordY(sc.nextLine());
^
</code></pre>

<p>symbol:   variable myTreeDPoint
  location: class Main</p>

<p>C:\Users\BurneySoo\Documents\Main.java:20: error: cannot find symbol</p>

<pre><code>myTreeDPoint.coordZ(sc.nextLine());
^
</code></pre>

<p>symbol:   variable myTreeDPoint
  location: class Main</p>

<p>C:\Users\BurneySoo\Documents\Main.java:22: error: non-static variable coordY cannot be referenced from a static context</p>

<pre><code>myThreeDPoint.setCoord(coordX, coordY, coordZ);
                               ^
</code></pre>

<p>C:\Users\BurneySoo\Documents\Main.java:22: error: non-static variable coordZ cannot be referenced from a static context</p>

<pre><code>myThreeDPoint.setCoord(coordX, coordY, coordZ);
                                       ^
</code></pre>

<p>C:\Users\BurneySoo\Documents\Main.java:22: error: method setCoord in class ThreeDPoint cannot be applied to given types;</p>

<pre><code>myThreeDPoint.setCoord(coordX, coordY, coordZ);
             ^
</code></pre>

<p>required: double,double,double
  found: String,double,double
  reason: actual argument String cannot be converted to double by method invocation conversion</p>

<p>C:\Users\BurneySoo\Documents\ThreeDPoint.java:6: error: cannot find symbol</p>

<pre><code>    coordX=0;
    ^
</code></pre>

<p>symbol:   variable coordX
  location: class ThreeDPoint</p>

<p>C:\Users\BurneySoo\Documents\ThreeDPoint.java:7: error: cannot find symbol</p>

<pre><code>    coordY=0;
    ^
</code></pre>

<p>symbol:   variable coordY
  location: class ThreeDPoint</p>

<p>C:\Users\BurneySoo\Documents\ThreeDPoint.java:8: error: cannot find symbol</p>

<pre><code>    coordZ=0;
    ^
</code></pre>

<p>symbol:   variable coordZ
  location: class ThreeDPoint</p>

<p>C:\Users\BurneySoo\Documents\ThreeDPoint.java:12: error: cannot find symbol</p>

<pre><code>    coordX = x;
    ^
</code></pre>

<p>symbol:   variable coordX
  location: class ThreeDPoint</p>

<p>C:\Users\BurneySoo\Documents\ThreeDPoint.java:13: error: cannot find symbol</p>

<pre><code>    coordY = y;
    ^
</code></pre>

<p>symbol:   variable coordY
  location: class ThreeDPoint</p>

<p>C:\Users\BurneySoo\Documents\ThreeDPoint.java:14: error: cannot find symbol</p>

<pre><code>    coordZ = z;
    ^
</code></pre>

<p>symbol:   variable coordZ
  location: class ThreeDPoint</p>

<p>14 errors</p>

<p>And It still won't prompt me to input coordinate X in the general output.
it only gave me:</p>

<p><strong>Error: Could not find or load main class Main</strong></p>
