Java Programming
primer-original-v2mediumJava Programming05 Regular Expressionprimer-original-v2

Observe the below code snippet String name="Sudha learns Oracle"; System.out.println(name.substring(7,12)); What is the output of the above code?

Answer options

A
substring(7,12)); What is the output of the above code?
B
learn
C
learns
D
earns

Correct answer: learns

Explanation

Quick AnswerThe correct answer is learns because it directly addresses the core logic of Java Programming.

This question has been retained as-is due to its unique context.

Related Java Programming questions

Practice more Java Programming questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.