I'm trying to call a non static method from the main method. all of these are in the same class, I know that if the method i am calling isnt static the program yields an error. How can i call the methods from the main without changing them to static?
public class BinSearch {
public static void main(String[] args){
createArray();
}
//creates an array
public int[] createArray(){
.....
}
}