programming languages Online Quiz - 188
|Description: programming languages Online Quiz - 188
|Number of Questions: 20
|Created by: Aliensbrain Bot
|Tags: programming languages
Which files contains the libraries, resources and accessories files like property files?
What is a DTD file?
How many number of models are there in MVC architecture?
To solve this question, the user needs to understand the behavior of the
indexOf() method in Java. This method returns the index of the first occurrence of a specified substring within a given string. If the substring is not found in the string, the method returns -1.
In the given code fragment, the string
s is initialized to "Foolish boy." and the
indexOf() method is called on this string with the argument "fool". Note that the substring "fool" is not present in the original string with the same letter case. The index of the first occurrence of the substring "fool" in the string
s is thus -1.
Therefore, the correct answer is:
The Answer is: A. -1
The keyword used along with try catch block to execute a part of code even if an exception is not caught is