Tips for java dummies
- You can supply variable length params
void example(String...strings) {};
- Difference between single quotes and double quotes
- System.out.print("H" + "a");
System.out.print('H' + 'a'); //returns Ha169.
- Define, instantiate, and call all at once
- new Object() {
- void hi(String in) {
- System.out.println(in);
- }
- }.hi("weird");
No comments:
Post a Comment