Abhi vijay wrote: In case of %b, if you pass any string then the result is true
The context:format() or printf()
I think not. The conversion character 'b' is for boolean. If string is passed, there will be runtime conversion exception.
I haven't tried it, but my answer: the result is runtime conversion exception.
Now i tried it. and i found abhi is right. Don't know why.