What Will Be The Output Of The Following Java Codep Pre #644
What will be the output of the following Java code?</p> <pre><code class="language-java"> public class indexOfFunction { public static class Inner { public void charPos(String a, char b) { System.out.println(a.indexOf(b)); System.out.println(a.indexOf(b,3); } } public static void main(String[] args) { indexOfFunction.Inner i = new indexOfFunction.Inner(); i.charPos("NVAEducation", 'n'); } } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 Types of Classes (Using Java) - Static Class - Quiz No.1.