Passing x,y coords through methods

Run Settings
LanguageJava
Language Version
Run Command
class Main { //void = execute methods or output to console public static void main(String[] args) { letterCheck(); } // if it is a type of variable, thats what will be returned public static int[] coords(){ int x,y; x=4; y=3; return new int[]{x,y}; } public static void letterCheck(){ int x,y; x=0; y=1; if(coords()[x]==4 && coords()[y] ==3){ System.out.println("Youre on an x!"); }else{ System.out.println("No letter detected."); } } }
Editor Settings
Theme
Key bindings
Full width
Lines