Skip to content

Instantly share code, notes, and snippets.

View erikbgithub's full-sized avatar

Erik Bernoth erikbgithub

View GitHub Profile
return actualValue < maximumValue;
if(actualValue < maximumValue) {
return True;
} else {
return False;
}
public class ShowIf {
public void printWay(boolean A, boolean B) {
if(A && B) {
System.out.println("A ist wahr, und auch B");
} else if(A) {
System.out.println("A ist wahr, aber nicht B");
} else if(B) {
System.out.println("B ist wahr, aber nicht A");
} else {
System.out.println("weder A noch B ist wahr");
public class ShowIf {
public void printWay(boolean A, boolean B) {
if(A) {
if(B) {
System.out.println("A ist wahr, und auch B");
} else {
System.out.println("A ist wahr, aber nicht B");
}
} else {
if(B) {
sut.printWay(true, true);
sut.printWay(true, false);
sut.printWay(false, true);
sut.printWay(false, false);
public class ShowIf {
public void printWay(boolean A, boolean B) {
if(A) {
System.out.println("A is true, but B is not");
}
if(B) {
System.out.println("B is true, but A is not");
}else{
System.out.println("Both A and B aren't true");
}