Computer Science, asked by khannaima35, 9 months ago

1 l What is an exception ? Name two exception handling blocks.
State the purpose and return data type of the following String functions:
d) indexof ()
b) compareTo()

Answers

Answered by vishal20573
1

Answer:

Question 1

concat() method is used to join two strings.

Question 2

The output of the following statement, when executed:

System.out.println("COMPUTER".charAt(4)); is U

Question 3

The output of the statement, when executed:

System.out.println("Object Oriented".length()); is 15

Question 4

+ operator is used to concatenate two strings.

Question 5

String declaration is terminated by the symbol ;(semicolon).

Question 6

Character literal is enclosed within single quotes (').

Question 7

The return type of the statement equals( ) is boolean.

Question 8

The output of "VIDYALAYA."substring(2,5) will result in DYA

Similar questions