Java Notes - Part 2: Core Concepts
Arrays & Strings
int[] nums = {1,2,3};
String name = "Java";
Methods & Parameters
int add(int a, int b) { return a+b; }
Packages & Import
import [Link];
Constructors
class Student {
Student() { [Link]("Constructor called"); }
}
Static & Final Keywords
- static: belongs to class, not object
- final: constant, cannot be changed
Wrapper Classes
Integer num = [Link](10);