I have tried these options
System.out.println(sin(Math.toRadians(180.0)))
System.out.println(sin(Math.toDegrees(180.0)))
System.out.println(sin(180.0))
But they gave different answers
1.2246467991473532E-16
0.5715301650260188
-0.8011526357338304
I understand that I did not understand something, but there was nothing on the Internet that could help me.