Styling doesn’t really matter. Code can be on one line. Sure, conventionally Java would have its brace in inline while C# would have its brace on a new line, but it all compiles the same, and in this case (coding exercise) int would actually be encouraged. learncpp.com uses the new line when learning to make it easier to read.
View all comments
Show parent comment
1
u/Da-Blue-Guy Nov 23 '21
Styling doesn’t really matter. Code can be on one line. Sure, conventionally Java would have its brace in inline while C# would have its brace on a new line, but it all compiles the same, and in this case (coding exercise) int would actually be encouraged. learncpp.com uses the new line when learning to make it easier to read.