I am trying to learn Java and am using Eclipse. For some reason the constructor I am using is not providing my Main class with the necessary information. Any help would be appreciated.
package com.wes.classes;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Ball ball = new Ball(mColor: "Blue", mName: "just ball", mCapacity: "12", mElasticity: "45");
ball.Bounce();
}
}
package com.wes.classes;
public class Ball {
//Properties of instance variables
private String color;
private String name;
private int elasticity;
private int capacity;
public Ball(String mColor, String mName, int mElasticity, int mCapacity) {
// TODO Auto-generated constructor stub
color = mColor;
name = mName;
elasticity = mElasticity;
capacity = mCapacity;
}
//Behaviors
public void Bounce() {System.out.println("Bouncing"); }
public void Deflate() {System.out.println("Deflate"); }
public void Inflate() { System.out.println("Inflate"); }
}