# Unsure why I cant call a method from a class

**URL:** <https://discourse.processing.org/t/unsure-why-i-cant-call-a-method-from-a-class/15315>\
**Category:** Beginners\
**Created:** [November 7, 2019, 3:58pm UTC](https://discourse.processing.org/t/unsure-why-i-cant-call-a-method-from-a-class/15315 "2019-11-07T15:58:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Djharr](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@Djharr](https://discourse.processing.org/u/Djharr)\
**Post date:** [November 7, 2019, 3:58pm UTC](https://discourse.processing.org/t/unsure-why-i-cant-call-a-method-from-a-class/15315/1 "2019-11-07T15:58:21Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/965b7107aff3ca71d579b3dadc979ff2e1d8745a.png)

Why does it say my DATE class or method doesnt exist?  
probably missing something silly but new to processing.

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [November 7, 2019, 4:08pm UTC](https://discourse.processing.org/t/unsure-why-i-cant-call-a-method-from-a-class/15315/2 "2019-11-07T16:08:44Z")

</div>

Welcome to the forum!

Nice to have you here -

To make a DATE you have to pass the parameters like

DATE myDate = new DATE ( 17,12, 2019);

the numbers of parameters must match

**Convention**

The Convention has it like this:

- Constants ALL\_UPPER\_CASE
- class names like Date UpperCase
- objects smallCase
- arrays plural and smallCase

Please post your code as text not as image

Regards, Chrisir

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [November 7, 2019, 5:45pm UTC](https://discourse.processing.org/t/unsure-why-i-cant-call-a-method-from-a-class/15315/3 "2019-11-07T17:45:58Z")

</div>

You need to add an explicit default constructor and you need to change the last method to use the constructor like this

```auto

class Date {
  int d;
  int m;
  int y;

  Date() {
  }

  Date(int day, int month, int year) {
    d = day;
    m = month;
    y = year;
    println(d, m, y);
  }
}

public void dates() {
  new Date();
}

```
