Using functions in other classes?

Hey, so I’m having this problem where one of my classes can’t locate a function. The function it’s trying to use is in another class, so I was wondering if there was something special you had to do. This is what I’m basically doing:
One class


package
{
...
public class whatever
{
...
public function dothis
{
...
}
}
}

and then the other class is like:


package
{
...
public class blah
{
...
public function blahlb
{
...
whatever.dothis()
}
}
}

How should i fix it?