Issues calling an object from another class within the same package

New to the board been researching stuff on my own and found this to be a great community.

Lurked for a bit as most of my questions had already been asked by others, but I can’t get my

head around this…

In my main class I have it check for files and if it doesn’t find those files I want it to run code

from another class to create this file. I know I’m doing something wrong as the method isn’t

found in the other class (according to errors.) They are a part of the same package.



EDIT:

worldstest.png should be listed as worldstest.png, but for some reason the code box drops

the “”.



inside main

[java]if(new File(“worlds\test.png”).exists()){

}else{

filename = “test”;

hmCreate(filename);

}[/java]



other class

[java]public class Perlin {

variable decelerations



public void hmCreate(string filename)

{

code to create file

}

}[/java]

The question you ask is a basic java / object oriented programming issue, I suggest you look into a good java introduction site before you try to wrap your head around game programming in java, e.g. http://www.javabeginner.com/