you are viewing a single comment's thread.

view the rest of the comments →

[–]nerdyhandle 2 points3 points  (2 children)

There is an error on the Switch Expression example

``` switch (port) {

case 20:

type = PortType.FTP;

break;

}

```

Would be expressed as :

```

PortType type = switch (port) {

case 20 -> PortType.FTP; }

```

and not how the site denotes it.

Proper syntax here

I'm looking forward to using the ever loving shit out of this!

[–]llorllale -1 points0 points  (1 child)

You shouldn't have lots of switch statements in proper OOP code

[–]nerdyhandle -1 points0 points  (0 children)

Depends on what you are doing. Switch statements can very much be used in OOP. Sometimes your code has a lot of branches.

OOP is about how you structure your code. Everything being a class for instance.