Java code snippet – How do you make a method that returns an array ? Subash Chandran 25th October 2021 Leave a Comment public static int[] numbers() { int[] arr={5,6,7,8,9}; //initializing array return arr; } Curly hair, very fair, please share 🙂Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Reddit (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email a link to a friend (Opens in new window) Related See also How to get the current year in PHP? Snippets Java code snippet - How do you make a method that returns an array ? Change font size A Decrease font size. A Reset font size. A Increase font size.