Computer Science, asked by safrinists, 15 hours ago

Question
1
Predict the output
Not yet
answered
Marked out of
200
P Flag
question
public class Main {
public static void main(String args) {
String sentence = "The purpose of our lives is to be happy":
int intindex = sentence.indexOf("Happy");
if(intlndex == -1){
System.out.println("Happy not found");
} else {
System.out.println(intIndex);
}
39641
}
Select one
O Compile time error
O Run time Exception
O 19
O Happy not found​

Answers

Answered by ayeshaayesha44139
2

Answer:

thhgyggffghjhgfddsxdb

Similar questions