in

if(true){return true} function Java

if-true-return-true-function-java

public static String ConvertBooleanToString(boolean ConditionToBeConverted){

return String. valueof(ConditionToBeConverted) ;

public static boolean IsTheConditionTrue(boolean condition) {

String ConvertedString = ConvertBooleanToString(condition);

switch(ConvertedString)

case “true”:

return true;

case “false”:

return false;

default:

// What the hell happened?

// Let’s randomly return something

if (Math. random() >=0.5){

return true;

}elsel

return false;

}

What do you think?

Written by codeitbro

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings