public class Foo {
public static Boolean convertTextToBooleanStatic(String text)
{
return Boolean.valueOf(text);
}
public Boolean convertTextToBoolean(String text)
{
return Boolean.valueOf(text);
}
}
// call the static Method
Boolean result = Foo.convertTextToBooleanStatic('true'); // => true
System.assertEquals(true, result);
// call the non static method
Foo fooReference = new Foo();
fooReference.convertTextToBoolean('true') // => true
System.assertEquals(true, result);
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.