Normal
Sicher? [code]>=[/code] sollte eher greifen als [code]||[/code][code=Java]public class OperatorenVorrang { public static void main(String[] args) { if (true || 10 >= 20) { System.out.println("1"); } if (true || 20 >= 10) { System.out.println("2"); } if (false || 10 >= 20) { System.out.println("3"); } if (false || 20 >= 10) { System.out.println("4"); } }}[/code]gibt[code]124[/code]aus.
Sicher? [code]>=[/code] sollte eher greifen als [code]||[/code]
[code=Java]public class OperatorenVorrang {
public static void main(String[] args) {
if (true || 10 >= 20) {
System.out.println("1");
}
if (true || 20 >= 10) {
System.out.println("2");
if (false || 10 >= 20) {
System.out.println("3");
if (false || 20 >= 10) {
System.out.println("4");
}[/code]
gibt
[code]1
2
4
[/code]
aus.