Skip to content

C# to Java Migration Convention

Naohide Sano edited this page Oct 22, 2022 · 2 revisions

C# to Java Migration Convention

  • getter/setter properties naming
  • enum with value
  • injection without constructor
  • lambda expression
  • extended for
  • delegate eliminate listFoo etc.
  • Encoding
  • substring 2nd param is index instead of length
  • Array.Clear 3rd param is index instead of length
  • Array.copy, Array.clear
  • Guid -> UUID
  • unit test (xUnit -> junit)
  • assembly -> ServiceLoader
  • attribute -> annotation
  • unsigned
  • object equals
  • operator overloads

Exceptions

  • -> IllegalArgumentException
  • -> IndexOutOfBoundsException
  • -> NullPointerException
Clone this wiki locally