Question: Consider the following Java code below: public class Example { public static void main(String (jargs) { String line - We are writing a code in
Consider the following Java code below: public class Example { public static void main(String (jargs) { String line - "We are writing a code in Java"; String str =/* string */; int pos - line.indexOf(str); System.out.println(line.substring(e, pos) + str); > } Which of the following should we use to replace /*string*/ so that the output is: We are writing? "ing" "Java" 11 code" 11 "a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
