Custom Methods Demo

Run Settings
LanguageJava
Language Version
Run Command
class Main { public static void main(String[] args) { demoMethod(); anotherOne(); System.out.println(doubleNumber(10)); } public static void demoMethod() { System.out.println("This is inside another method!"); } public static void anotherOne(){ int a, b, c; a=2; b=3; c=a+b; System.out.println(c); } /* *This custom function takes an integer *and multiplies by 2. It then returns the *doubled number. */ public static int doubleNumber(int b){ return (b * 2); } }
Editor Settings
Theme
Key bindings
Full width
Lines