Java

From wiki
Revision as of 21:41, 31 May 2022 by Hdridder (talk | contribs) (Created page with "20220531 Fist notes on java progamming. <syntaxhighlight lang=java> public class HelloWorld { public static void main(String args[] ) { String text = "hello world"; Sys...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

20220531

Fist notes on java progamming.

public class HelloWorld {
	public static void main(String args[] ) {
		String text = "hello world";
		System.out.println( text );
	}
}

If a class implements an interface all methods in that interface must be defined in the class

Variables

int var1 = 0
Variables must be declared and initialised